wikitree / wikitree-browser-extension

Browser extension that adds advanced features to WikiTree.com.
MIT License
26 stars 20 forks source link

Error in Chrome after the update to v15 #115

Closed Lesko987 closed 1 year ago

Lesko987 commented 1 year ago

After updating to v15 I got an error on extension reload. With dist folder and with published zip file.

After Inspecting view in service worker I found this error

Error in event handler: ReferenceError: window is not defined at chrome-extension://aicngmhgodhjdeiblaikecebkoaaoaac/background.js:7:5

And clicking the code link returns

chrome.runtime.onInstalled.addListener(function (details) { if (details.reason == "install") { chrome.runtime.openOptionsPage(); window.open("https://www.wikitree.com/wiki/Space:WikiTree_Browser_Extension%22); } else if (details.reason == "update") { // Remove the slashes below after a significant update (e.g. a new feature). window.open("https://www.wikitree.com/wiki/Space:WikiTree_Browser_Extension_Update%22); } });

I think the error was on 2nd window.open command. The extension otherwise works.

shogenapps commented 1 year ago

I've fixed this.