fix lints (#8737)
* fix: emits use ev instead of e * fix: errors use err instead of e * fix: replace use of data where possible * fix: events use evt instead of e * fix: use strict equals * fix: use emoji instead of e * fix: vue lints
This commit is contained in:
@@ -14,9 +14,9 @@ export async function fetchThemes(): Promise<void> {
|
||||
try {
|
||||
const themes = await api('i/registry/get', { scope: ['client'], key: 'themes' });
|
||||
localStorage.setItem(lsCacheKey, JSON.stringify(themes));
|
||||
} catch (e) {
|
||||
if (e.code === 'NO_SUCH_KEY') return;
|
||||
throw e;
|
||||
} catch (err) {
|
||||
if (err.code === 'NO_SUCH_KEY') return;
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ export async function addTheme(theme: Theme): Promise<void> {
|
||||
}
|
||||
|
||||
export async function removeTheme(theme: Theme): Promise<void> {
|
||||
const themes = getThemes().filter(t => t.id != theme.id);
|
||||
const themes = getThemes().filter(t => t.id !== theme.id);
|
||||
await api('i/registry/set', { scope: ['client'], key: 'themes', value: themes });
|
||||
localStorage.setItem(lsCacheKey, JSON.stringify(themes));
|
||||
}
|
||||
|
Reference in New Issue
Block a user