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 30, 2022
1 parent d3b8478 commit 526b593
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ function getGrepSpecsToRun (clientConfig, specs) {
function parseQueryParams (location) {
var params = {}
if (location && Object.prototype.hasOwnProperty.call(location, 'search')) {
var pairs = location.search.substr(1).split('&')
var pairs = location.search.slice(1).split('&')
for (var i = 0; i < pairs.length; i++) {
var keyValue = pairs[i].split('=')
params[decodeURIComponent(keyValue[0])] =
Expand Down

0 comments on commit 526b593

Please sign in to comment.