diff options
author | mehekj <mehek.jethani@gmail.com> | 2022-09-20 11:52:44 -0400 |
---|---|---|
committer | mehekj <mehek.jethani@gmail.com> | 2022-09-20 11:52:44 -0400 |
commit | 945c0cd12fb2a792d10800f81b52cbac8aa12a41 (patch) | |
tree | bad726c19905e6bf8910d96d0b79eaff1b319457 /src/client/documents/Documents.ts | |
parent | 87096243391cf172c26190897c79321b3d42817c (diff) |
display error instead of infinitely loading after refresh
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r-- | src/client/documents/Documents.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 14e6fe5bb..4f652b6e4 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -1758,7 +1758,7 @@ export namespace DocUtils { const full = { ...options, _width: 400, title: name }; const pathname = Utils.prepend(result.accessPaths.agnostic.client); const doc = await DocUtils.DocumentFromType(type, pathname, full, rootDoc); - rootDoc && (rootDoc.isLoading = undefined); + rootDoc && (rootDoc.isLoading = undefined) && Doc.removeCurrentlyLoading(rootDoc); if (doc) { const proto = Doc.GetProto(doc); proto.text = result.rawText; @@ -1840,6 +1840,7 @@ export namespace DocUtils { if (overwriteDoc) { overwriteDoc.isLoading = false; overwriteDoc.errorMessage = (result as any).message; + Doc.removeCurrentlyLoading(overwriteDoc); } } else name && processFileupload(generatedDocuments, name, type, result, options, overwriteDoc); }); @@ -1868,6 +1869,7 @@ export namespace DocUtils { if (overwriteDoc) { overwriteDoc.isLoading = false; overwriteDoc.errorMessage = (result as any).message; + Doc.removeCurrentlyLoading(overwriteDoc); } } else name && type && processFileupload(generatedDocuments, name, type, result, options, overwriteDoc); }); |