diff --git a/packages/core/src/api/modules/fetch.ts b/packages/core/src/api/modules/fetch.ts index 616a3b0..7219cc7 100644 --- a/packages/core/src/api/modules/fetch.ts +++ b/packages/core/src/api/modules/fetch.ts @@ -27,7 +27,7 @@ const detectFetch = (): FetchType | null => { if (typeof callback === 'function') { return callback; } - } catch { + } catch (err) { // } diff --git a/packages/core/src/browser-storage/index.ts b/packages/core/src/browser-storage/index.ts index b0494b6..62850a3 100644 --- a/packages/core/src/browser-storage/index.ts +++ b/packages/core/src/browser-storage/index.ts @@ -89,7 +89,7 @@ function getGlobal(key: keyof StorageConfig): typeof localStorage | null { ) { return _window[attr]; } - } catch { + } catch (err) { // } @@ -110,7 +110,7 @@ function setCount( storage.setItem(countKey, value.toString()); count[key] = value; return true; - } catch { + } catch (err) { // } return false; @@ -142,7 +142,7 @@ function initCache( ): void { try { storage.setItem(versionKey, cacheVersion); - } catch { + } catch (err) { // } setCount(storage, key, 0); @@ -159,7 +159,7 @@ function destroyCache(storage: typeof localStorage): void { for (let i = 0; i < total; i++) { storage.removeItem(cachePrefix + i.toString()); } - } catch { + } catch (err) { // } } @@ -214,7 +214,7 @@ export const loadCache: LoadIconsCache = (): void => { const storage = getStorage(provider, prefix); valid = addIconSet(storage, data.data).length > 0; } - } catch { + } catch (err) { valid = false; } @@ -254,7 +254,7 @@ export const loadCache: LoadIconsCache = (): void => { // Update total setCount(func, key, total); - } catch { + } catch (err) { // } } @@ -303,7 +303,7 @@ export const storeCache: CacheIcons = ( data, }; func.setItem(cachePrefix + index.toString(), JSON.stringify(item)); - } catch { + } catch (err) { return false; } return true; diff --git a/packages/core/src/storage/storage.ts b/packages/core/src/storage/storage.ts index d1ee649..dc16934 100644 --- a/packages/core/src/storage/storage.ts +++ b/packages/core/src/storage/storage.ts @@ -47,7 +47,7 @@ try { if (w && w._iconifyStorage.version === storageVersion) { storage = w._iconifyStorage.storage; } -} catch { +} catch (err) { // } @@ -63,7 +63,7 @@ export function shareStorage(): void { storage, }; } - } catch { + } catch (err) { // } } @@ -128,7 +128,7 @@ export function addIconToStorage( storage.icons[name] = Object.freeze(fullIcon(icon)); return true; } - } catch { + } catch (err) { // Do nothing } return false;