From ee3450e747d3e70377f97d48f4632a5f66663d96 Mon Sep 17 00:00:00 2001 From: Tobias Speicher Date: Tue, 22 Mar 2022 09:22:16 +0100 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 --- src/main/js/functions/urlUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/js/functions/urlUtils.ts b/src/main/js/functions/urlUtils.ts index bd343a2..3f984a3 100644 --- a/src/main/js/functions/urlUtils.ts +++ b/src/main/js/functions/urlUtils.ts @@ -6,7 +6,7 @@ */ export function parseQueryParams(query: string = ''): Record { const parsedQueryParams = {}; - const params = query.substr(query.startsWith('?') ? 1 : 0).split('&'); + const params = query.slice(query.startsWith('?') ? 1 : 0).split('&'); for (const param of params) { const [ key, value ] = param.split('=');