Parcourir la source

ensure this.chrome is defined

Gildas il y a 7 ans
Parent
commit
6398b7dda9
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      lib/browser-polyfill/chrome-browser-polyfill.js

+ 1 - 1
lib/browser-polyfill/chrome-browser-polyfill.js

@@ -26,7 +26,7 @@
 
 	const FEATURE_TESTS = {};
 
-	if (isChrome && !this.browser) {
+	if (isChrome && !this.browser && this.chrome) {
 		const nativeAPI = this.chrome;
 		this.__defineGetter__("browser", () => ({
 			browserAction: {