From cb43e33a2d9c58f63155de670eeaa7b71c4d16e6 Mon Sep 17 00:00:00 2001 From: Maximilian Mairinger Date: Sat, 13 Apr 2024 00:35:26 +0200 Subject: [PATCH] fix type --- app/src/moreProms.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/moreProms.ts b/app/src/moreProms.ts index 91a5944..e8dc962 100644 --- a/app/src/moreProms.ts +++ b/app/src/moreProms.ts @@ -12,7 +12,7 @@ export function latestLatent(cb: (...args: Args) => function request(...args: Args) { prom.cancel() const r = cb(...args) - prom = r instanceof CancelAblePromise ? r as CancelAblePromise : new CancelAblePromise((res, rej) => { r.then(res, rej) }, () => {}) + prom = r instanceof CancelAblePromise ? r as CancelAblePromise : new CancelAblePromise((res, rej) => { (r as Promise).then(res, rej) }, () => {}) lastPromHasUpdated(futures, prom) // console.log("callingVesselProm", callingPromUID) return callingPromUID === undefined ? prom : uidToProm.get(callingPromUID)