webext-schema 2.3.1 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -254,9 +254,11 @@ export const getEnabledTheme = async () => {
254
254
  const { management } = browser;
255
255
  try {
256
256
  const arr = await management.getAll();
257
- res = arr.filter(info =>
258
- info.type && info.type === 'theme' && info.enabled && info
259
- );
257
+ if (Array.isArray(arr) && arr.length) {
258
+ res = arr.filter(info =>
259
+ info.type && info.type === 'theme' && info.enabled && info
260
+ );
261
+ }
260
262
  } catch (e) {
261
263
  logErr(e);
262
264
  }
@@ -299,7 +301,10 @@ export const getExternalExtensions = async () => {
299
301
  const { management } = browser;
300
302
  try {
301
303
  const arr = await management.getAll();
302
- res = arr.filter(info => info.type && info.type === 'extension' && info);
304
+ if (Array.isArray(arr) && arr.length) {
305
+ res =
306
+ arr.filter(info => info.type && info.type === 'extension' && info);
307
+ }
303
308
  } catch (e) {
304
309
  logErr(e);
305
310
  }
package/package.json CHANGED
@@ -41,12 +41,12 @@
41
41
  "eslint": "^8.14.0",
42
42
  "eslint-config-standard": "^17.0.0",
43
43
  "eslint-plugin-import": "^2.26.0",
44
- "eslint-plugin-jsdoc": "^39.2.7",
44
+ "eslint-plugin-jsdoc": "^39.2.8",
45
45
  "eslint-plugin-node": "^11.1.0",
46
46
  "eslint-plugin-promise": "^6.0.0",
47
47
  "mocha": "^9.2.2",
48
48
  "nock": "^13.2.4",
49
49
  "npm-run-all": "^4.1.5"
50
50
  },
51
- "version": "2.3.1"
51
+ "version": "2.3.2"
52
52
  }