Skip to content

Commit d6e3631

Browse files
authored
fix: check for promise properly (#565)
1 parent 1d888f3 commit d6e3631

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class Observer {
131131
});
132132
}
133133

134-
const p = promise instanceof Promise ? promise : promise();
134+
const p = Promise.resolve(promise instanceof Function ? promise() : promise);
135135

136136
let shouldDismiss = id !== undefined;
137137
let result: ['resolve', ToastData] | ['reject', unknown];

0 commit comments

Comments
 (0)