diff --git a/packages/svelte/src/internal/common.js b/packages/svelte/src/internal/common.js index 03fc1df070..1ea482a801 100644 --- a/packages/svelte/src/internal/common.js +++ b/packages/svelte/src/internal/common.js @@ -10,11 +10,7 @@ export const EMPTY_FUNC = () => {}; * @returns {value is PromiseLike} */ export function is_promise(value) { - return ( - !!value && - (typeof value === 'object' || typeof value === 'function') && - typeof (/** @type {any} */ (value).then) === 'function' - ); + return typeof value?.then === 'function'; } /** @param {Array<() => void>} arr */