diff --git a/frontend/app/view/preview/preview.tsx b/frontend/app/view/preview/preview.tsx index 00d1412f5..fda095a72 100644 --- a/frontend/app/view/preview/preview.tsx +++ b/frontend/app/view/preview/preview.tsx @@ -190,7 +190,11 @@ export class PreviewModel implements ViewModel { }); this.fileName = jotai.atom( (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 });