From 2f6978ea0239cf97efb712812a6c4282a8c4518e Mon Sep 17 00:00:00 2001 From: Tobias Speicher Date: Fri, 18 Feb 2022 09:27:52 +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 works similarily but isn't deprecated. Signed-off-by: Tobias Speicher --- scripts/add-blob.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/add-blob.mjs b/scripts/add-blob.mjs index f1b97c3..74706db 100644 --- a/scripts/add-blob.mjs +++ b/scripts/add-blob.mjs @@ -55,7 +55,7 @@ const file = args[1]; const cmp = keyToComponent(entry.key); - let source = entry.calls ? entry.calls.join('\n').substr(0, 512) : null; + let source = entry.calls ? entry.calls.join('\n').slice(0, 512) : null; if ( source?.includes('MainMenu.getSettingsTree') ) source = 'FFZ Control Center';