Skip to content

Commit

Permalink
refactor: replace deprecated String.prototype.substr()
Browse files Browse the repository at this point in the history
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
  • Loading branch information
CommanderRoot authored and Jonathan Ginsburg committed Mar 27, 2022
1 parent 1b6ded5 commit 263a870
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion static/context.js
Expand Up @@ -123,7 +123,7 @@ exports.isDefined = function (value) {

exports.parseQueryParams = function (locationSearch) {
var params = {}
var pairs = locationSearch.substr(1).split('&')
var pairs = locationSearch.slice(1).split('&')
var keyValue

for (var i = 0; i < pairs.length; i++) {
Expand Down
4 changes: 2 additions & 2 deletions static/karma.js
Expand Up @@ -348,7 +348,7 @@ var socket = io(location.host, {
reconnectionDelay: 500,
reconnectionDelayMax: Infinity,
timeout: BROWSER_SOCKET_TIMEOUT,
path: KARMA_PROXY_PATH + KARMA_URL_ROOT.substr(1) + 'socket.io',
path: KARMA_PROXY_PATH + KARMA_URL_ROOT.slice(1) + 'socket.io',
'sync disconnect on unload': true,
useNativeTimers: true
})
Expand Down Expand Up @@ -565,7 +565,7 @@ exports.isDefined = function (value) {

exports.parseQueryParams = function (locationSearch) {
var params = {}
var pairs = locationSearch.substr(1).split('&')
var pairs = locationSearch.slice(1).split('&')
var keyValue

for (var i = 0; i < pairs.length; i++) {
Expand Down

0 comments on commit 263a870

Please sign in to comment.