Skip to content

Commit

Permalink
Fix promise support check in content scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ExE-Boss committed Jun 18, 2018
1 parent 0cbd8b4 commit a62cf86
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/browser-polyfill.js
Expand Up @@ -36,11 +36,11 @@ const supportsPromises = () => {
}
try {
return isThenable(browser.runtime.getPlatformInfo());
} catch (error) {/* silence ESLint */}
// Microsoft Edge doesn’t support `browser.runtime.getPlatformInfo()`
} catch (error) { /* silence ESLint */ }
// Content scripts can’t access the platform info
try {
return isThenable(browser.windows.get(browser.windows.WINDOW_ID_CURRENT));
} catch (error) {/* silence ESLint */}
return isThenable(browser.i18n.getAcceptLanguages());
} catch (error) { /* silence ESLint */ }
return false;
};

Expand Down

0 comments on commit a62cf86

Please sign in to comment.