From b7ff2798378cd6a03f6ab8b101a637df23f39e05 Mon Sep 17 00:00:00 2001 From: Tobias Speicher Date: Sat, 19 Mar 2022 02:29:57 +0100 Subject: [PATCH] chore: 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 --- app/utils/to-electron-background-color.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/to-electron-background-color.ts b/app/utils/to-electron-background-color.ts index 1a526534..fc4a9799 100644 --- a/app/utils/to-electron-background-color.ts +++ b/app/utils/to-electron-background-color.ts @@ -13,5 +13,5 @@ export default (bgColor: string) => { // http://stackoverflow.com/a/11019879/1202488 const alphaHex = Math.round(color.alpha() * 255).toString(16); - return `#${alphaHex}${color.hex().toString().substr(1)}`; + return `#${alphaHex}${color.hex().toString().slice(1)}`; };