From 51042f8f709747ea76e703944f3f6f1020afa06d Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 31 May 2015 19:00:11 -0600 Subject: [PATCH] Fixes #1398 --- platform/safari/vapi-background.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } };