1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-07 03:12:33 +01:00

Fix auto-completion for epicker in Firefox

This commit is contained in:
Raymond Hill 2020-12-15 09:38:20 -05:00
parent 0052dc123b
commit a090b2b564
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -84,7 +84,8 @@ const cmEditor = new CodeMirror(document.querySelector('.codeMirrorContainer'),
vAPI.messaging.send('dashboard', { vAPI.messaging.send('dashboard', {
what: 'getAutoCompleteDetails' what: 'getAutoCompleteDetails'
}).then(response => { }).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(); const mode = cmEditor.getMode();
if ( mode.setHints instanceof Function ) { if ( mode.setHints instanceof Function ) {
mode.setHints(response); mode.setHints(response);