From aa5f6f4109fd78519124da4a5633954d1adf1eb5 Mon Sep 17 00:00:00 2001 From: Tobias Speicher Date: Fri, 18 Mar 2022 05:14:58 +0100 Subject: [PATCH] Replace deprecated String.prototype.substr() String.prototype.substr() is deprecated (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) so we replace it with slice() which isn't deprecated. Signed-off-by: Tobias Speicher --- src/helpers/helpers.core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/helpers.core.js b/src/helpers/helpers.core.js index a9e13098b..e169e228c 100644 --- a/src/helpers/helpers.core.js +++ b/src/helpers/helpers.core.js @@ -30,7 +30,7 @@ export function getElementCenterPoint(element, useFinalPosition) { return {x, y}; } -const isOlderPart = (act, req) => req > act || (act.length > req.length && act.substr(0, req.length) === req); +const isOlderPart = (act, req) => req > act || (act.length > req.length && act.slice(0, req.length) === req); export function requireVersion(pkg, min, ver, strict = true) { const parts = ver.split('.');