diff --git a/interface/resources/qml/+webengine/QmlWebWindowView.qml b/interface/resources/qml/+webengine/QmlWebWindowView.qml index d2f1820e9a..84ab61ad28 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..2fa08428ae 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..d888375db2 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)); } }