fix: binding logic revit 2022

This commit is contained in:
Matteo Cominetti
2023-04-20 16:54:14 +02:00
parent fedd808b85
commit 2041402ec6
+6 -4
View File
@@ -160,10 +160,12 @@ export default {
},
SpeckleUiBindings() {
//NOTE: in revit chrome.webview.hostObjects.UiBindings is not null because it does have webview2
if (typeof UiBindings === "undefined" || UiBindings === null) {
return chrome.webview.hostObjects.UiBindings;
}
return UiBindings;
try {
if (window.UiBindings) return window.UiBindings;
if (window.chrome.webview.hostObjects.UiBindings)
return window.chrome.webview.hostObjects.UiBindings;
} catch {}
return null;
},
},
data() {