Fix incorrect typecheck that fails on undefined

This commit is contained in:
Manav Rathi 2024-04-11 15:35:25 +05:30
parent ff66a2f44c
commit ef4462553c
No known key found for this signature in database

View file

@ -186,8 +186,7 @@ class MLWorkManager {
return mlWorker.syncLocalFile(token, userID, enteFile, localFile);
});
// @ts-expect-error "TODO: Fix ML related type errors"
if ("message" in result) {
if (result instanceof Error) {
// TODO: redirect/refresh to gallery in case of session_expired
// may not be required as uploader should anyways take care of this
console.error("Error while syncing local file: ", result);