diff --git a/interface/resources/qml/+webengine/QmlWebWindowView.qml b/interface/resources/qml/+webengine/QmlWebWindowView.qml index d2f1820e9a..c2ac92a1a7 100644 --- a/interface/resources/qml/+webengine/QmlWebWindowView.qml +++ b/interface/resources/qml/+webengine/QmlWebWindowView.qml @@ -40,7 +40,7 @@ Controls.WebView { userScripts: [ createGlobalEventBridge, raiseAndLowerKeyboard, userScript ] function onWebEventReceived(event) { - if (event.slice(0, 17) === "CLARA.IO DOWNLOAD") { + if (typeof event === 'string' && event.slice(0, 17) === "CLARA.IO DOWNLOAD") { ApplicationInterface.addAssetToWorldFromURL(event.slice(18)); } } diff --git a/interface/resources/qml/hifi/tablet/TabletRoot.qml b/interface/resources/qml/hifi/tablet/TabletRoot.qml index 6001497743..be8a0cabe0 100644 --- a/interface/resources/qml/hifi/tablet/TabletRoot.qml +++ b/interface/resources/qml/hifi/tablet/TabletRoot.qml @@ -200,7 +200,7 @@ Rectangle { id: eventBridgeConnection target: eventBridge onWebEventReceived: { - if (message.slice(0, 17) === "CLARA.IO DOWNLOAD") { + if (typeof message === 'string' && message.slice(0, 17) === "CLARA.IO DOWNLOAD") { ApplicationInterface.addAssetToWorldFromURL(message.slice(18)); } } diff --git a/interface/resources/qml/hifi/tablet/WindowRoot.qml b/interface/resources/qml/hifi/tablet/WindowRoot.qml index ef2df5e218..05107699e0 100644 --- a/interface/resources/qml/hifi/tablet/WindowRoot.qml +++ b/interface/resources/qml/hifi/tablet/WindowRoot.qml @@ -118,7 +118,7 @@ Windows.ScrollingWindow { id: eventBridgeConnection target: eventBridge onWebEventReceived: { - if (message.slice(0, 17) === "CLARA.IO DOWNLOAD") { + if (typeof message === 'string' && message.slice(0, 17) === "CLARA.IO DOWNLOAD") { ApplicationInterface.addAssetToWorldFromURL(message.slice(18)); } }