diff --git a/core/src/runtime.ts b/core/src/runtime.ts index 2b025f2459..d2b5126090 100644 --- a/core/src/runtime.ts +++ b/core/src/runtime.ts @@ -149,7 +149,7 @@ export const createCapacitor = (win: WindowCapacitor): CapacitorInstance => { ); }; - const p = new Promise((resolve) => call.then(() => resolve({ remove }))); + const p = call.then(() => ({ remove })); (p as any).remove = async () => { console.warn(`Using addListener() without 'await' is deprecated.`);