From 263a87025a88b040f51a825d516654ef7d8de88b Mon Sep 17 00:00:00 2001 From: Tobias Speicher Date: Sun, 27 Mar 2022 14:18:23 +0200 Subject: [PATCH] refactor: replace deprecated String.prototype.substr() .substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher --- static/context.js | 2 +- static/karma.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/static/context.js b/static/context.js index 8d697eff8..94e1f24ae 100644 --- a/static/context.js +++ b/static/context.js @@ -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++) { diff --git a/static/karma.js b/static/karma.js index 23081eb7f..04c7ad322 100644 --- a/static/karma.js +++ b/static/karma.js @@ -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 }) @@ -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++) {