From e47a0f488f3d9bbcb76ebcf4f5afe203c1ee06c0 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Tue, 27 Feb 2024 07:23:42 -0500 Subject: Object utilities (#729) * Create utilities * Rename old isObject * Use new isObject * Remove old function * Add additional function * Simplify for now * Rename function for clarity * Rename function * Expand type * Update eslint --- ext/js/input/hotkey-help-controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/js/input') diff --git a/ext/js/input/hotkey-help-controller.js b/ext/js/input/hotkey-help-controller.js index 1fa9372f..16f3d26f 100644 --- a/ext/js/input/hotkey-help-controller.js +++ b/ext/js/input/hotkey-help-controller.js @@ -17,7 +17,7 @@ */ import {parseJson} from '../core/json.js'; -import {isObject} from '../core/utilities.js'; +import {isObjectNotArray} from '../core/object-utilities.js'; import {HotkeyUtil} from './hotkey-util.js'; export class HotkeyHelpController { @@ -93,7 +93,7 @@ export class HotkeyHelpController { */ _getAllCommands() { return new Promise((resolve, reject) => { - if (!(isObject(chrome.commands) && typeof chrome.commands.getAll === 'function')) { + if (!(isObjectNotArray(chrome.commands) && typeof chrome.commands.getAll === 'function')) { resolve([]); return; } -- cgit v1.2.3