From 467e151aca66d15b823ffb96e64f15e27a9839ad Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Tue, 10 Sep 2024 14:46:59 -0700 Subject: [PATCH] fix webview url not being able to be empty --- frontend/app/view/webview/webview.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/app/view/webview/webview.tsx b/frontend/app/view/webview/webview.tsx index df7c1d434..4802c7e51 100644 --- a/frontend/app/view/webview/webview.tsx +++ b/frontend/app/view/webview/webview.tsx @@ -39,7 +39,7 @@ export class WebViewModel implements ViewModel { this.blockId = blockId; this.blockAtom = WOS.getWaveObjectAtom(`block:${blockId}`); - this.url = jotai.atom(""); + this.url = jotai.atom(); this.isUrlDirty = jotai.atom(false); this.urlInput = jotai.atom(""); this.urlWrapperClassName = jotai.atom(""); @@ -53,7 +53,7 @@ export class WebViewModel implements ViewModel { this.viewText = jotai.atom((get) => { let url = get(this.blockAtom)?.meta?.url || ""; - if (url && !get(this.url)) { + if (url && get(this.url) === undefined) { globalStore.set(this.url, url); } const urlIsDirty = get(this.isUrlDirty);