aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/LoadingBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-12-02 15:53:28 -0500
committerbobzel <zzzman@gmail.com>2023-12-02 15:53:28 -0500
commit9c7e055a2cf7ca5bc517edd3a9f44e128ec40ff3 (patch)
tree478af3a38d932bcee56efd455bc371751a6766b6 /src/client/views/nodes/LoadingBox.tsx
parent6abda9e76cce35272ff73c3911af5aa8c18ce30b (diff)
fixed jimp upload to not hang when error occurs. fied imagebox to show original image if resized images fail.
Diffstat (limited to 'src/client/views/nodes/LoadingBox.tsx')
-rw-r--r--src/client/views/nodes/LoadingBox.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/LoadingBox.tsx b/src/client/views/nodes/LoadingBox.tsx
index 01dd830f8..e554cb8ad 100644
--- a/src/client/views/nodes/LoadingBox.tsx
+++ b/src/client/views/nodes/LoadingBox.tsx
@@ -63,13 +63,14 @@ export class LoadingBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
const updateFunc = async () => {
const result = await Networking.QueryYoutubeProgress(StrCast(this.Document[Id])); // We use the guid of the overwriteDoc to track file uploads.
runInAction(() => (this.progress = result.progress));
- !this.Document.loadingError && (this._timer = setTimeout(updateFunc, 1000));
+ !this.Document.loadingError && this._timer && (this._timer = setTimeout(updateFunc, 1000));
};
this._timer = setTimeout(updateFunc, 1000);
}
}
componentWillUnmount() {
clearTimeout(this._timer);
+ this._timer = undefined;
}
render() {