diff --git a/platform/safari/vapi-background.js b/platform/safari/vapi-background.js index 510c22391..28ad0c33e 100644 --- a/platform/safari/vapi-background.js +++ b/platform/safari/vapi-background.js @@ -870,9 +870,10 @@ broadcast: true, msg: message }; - + var page; for(var tabId in vAPI.tabs.stack) { - vAPI.tabs.stack[tabId].page.dispatchMessage('broadcast', message); + page = vAPI.tabs.stack[tabId].page; + page && page.dispatchMessage && page.dispatchMessage('broadcast', message); } };