diff --git a/background/index.js b/background/index.js index a54bdb5..df6ad7b 100644 --- a/background/index.js +++ b/background/index.js @@ -52,7 +52,7 @@ const fetchNewData = () => { }); fetchSpaceApi().then((json) => { - if (window.spaceApi.state.open !== json.state.open) { + if (window.spaceApi && window.spaceApi.state.open !== json.state.open) { sendNotification(json.state.open) } window.spaceApi = json;