Sfoglia il codice sorgente

ensure this.chrome is defined

Gildas 7 anni fa
parent
commit
6398b7dda9
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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: {