Explorar el Código

make sure options exists

Gildas hace 5 años
padre
commit
e8d0447217
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      extension/core/content/content-bootstrap.js

+ 1 - 1
extension/core/content/content-bootstrap.js

@@ -34,7 +34,7 @@ this.singlefile.extension.core.content.bootstrap = this.singlefile.extension.cor
 	browser.runtime.sendMessage({ method: "autosave.init" }).then(message => {
 		options = message.options;
 		autoSaveEnabled = message.autoSaveEnabled;
-		if (options.autoOpenEditor && detectSavedPage(document)) {
+		if (options && options.autoOpenEditor && detectSavedPage(document)) {
 			if (document.readyState == "loading") {
 				document.addEventListener("DOMContentLoaded", () => openEditor(document));
 			} else {