Replace deprecated String#substr with String#slice (#8314)

This commit is contained in:
CommanderRoot 2022-04-14 09:52:42 +02:00 committed by GitHub
parent 0e68c16a90
commit c35fc169f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 37 additions and 37 deletions

View file

@ -230,7 +230,7 @@ export async function setTheme(theme?: string): Promise<void> {
clearCustomTheme();
let stylesheetName = theme;
if (theme.startsWith("custom-")) {
const customTheme = getCustomTheme(theme.substr(7));
const customTheme = getCustomTheme(theme.slice(7));
stylesheetName = customTheme.is_dark ? "dark-custom" : "light-custom";
setCustomThemeVars(customTheme);
}