mirror of
https://github.com/wavetermdev/waveterm
synced 2026-05-24 01:08:27 +00:00
default file to ~
This commit is contained in:
parent
a0734a3bbe
commit
f535c5c1ab
1 changed files with 5 additions and 1 deletions
|
|
@ -190,7 +190,11 @@ export class PreviewModel implements ViewModel {
|
|||
});
|
||||
this.fileName = jotai.atom<string, [string], void>(
|
||||
(get) => {
|
||||
return get(this.blockAtom)?.meta?.file;
|
||||
const file = get(this.blockAtom)?.meta?.file;
|
||||
if (util.isBlank(file)) {
|
||||
return "~";
|
||||
}
|
||||
return file;
|
||||
},
|
||||
(get, set, update) => {
|
||||
services.ObjectService.UpdateObjectMeta(`block:${blockId}`, { file: update });
|
||||
|
|
|
|||
Loading…
Reference in a new issue