From a090b2b564819dee3b9dec11984d74186d788af1 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 15 Dec 2020 09:38:20 -0500 Subject: [PATCH] Fix auto-completion for epicker in Firefox --- src/js/epicker-ui.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/epicker-ui.js b/src/js/epicker-ui.js index 5b6f73a4a..6fc8a362d 100644 --- a/src/js/epicker-ui.js +++ b/src/js/epicker-ui.js @@ -84,7 +84,8 @@ const cmEditor = new CodeMirror(document.querySelector('.codeMirrorContainer'), vAPI.messaging.send('dashboard', { what: 'getAutoCompleteDetails' }).then(response => { - if ( response instanceof Object === false ) { return; } + // For unknown reasons, `instanceof Object` does not work here in Firefox. + if ( typeof response !== 'object' ) { return; } const mode = cmEditor.getMode(); if ( mode.setHints instanceof Function ) { mode.setHints(response);