mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
fix webview url not being able to be empty
This commit is contained in:
parent
29db989623
commit
467e151aca
@ -39,7 +39,7 @@ export class WebViewModel implements ViewModel {
|
|||||||
this.blockId = blockId;
|
this.blockId = blockId;
|
||||||
this.blockAtom = WOS.getWaveObjectAtom<Block>(`block:${blockId}`);
|
this.blockAtom = WOS.getWaveObjectAtom<Block>(`block:${blockId}`);
|
||||||
|
|
||||||
this.url = jotai.atom("");
|
this.url = jotai.atom();
|
||||||
this.isUrlDirty = jotai.atom(false);
|
this.isUrlDirty = jotai.atom(false);
|
||||||
this.urlInput = jotai.atom("");
|
this.urlInput = jotai.atom("");
|
||||||
this.urlWrapperClassName = jotai.atom("");
|
this.urlWrapperClassName = jotai.atom("");
|
||||||
@ -53,7 +53,7 @@ export class WebViewModel implements ViewModel {
|
|||||||
|
|
||||||
this.viewText = jotai.atom((get) => {
|
this.viewText = jotai.atom((get) => {
|
||||||
let url = get(this.blockAtom)?.meta?.url || "";
|
let url = get(this.blockAtom)?.meta?.url || "";
|
||||||
if (url && !get(this.url)) {
|
if (url && get(this.url) === undefined) {
|
||||||
globalStore.set(this.url, url);
|
globalStore.set(this.url, url);
|
||||||
}
|
}
|
||||||
const urlIsDirty = get(this.isUrlDirty);
|
const urlIsDirty = get(this.isUrlDirty);
|
||||||
|
Loading…
Reference in New Issue
Block a user