Skip to content

Commit 593f142

Browse files
committed
fix(applyMethod): better error reporting for missing methods
1 parent 2e89031 commit 593f142

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,9 @@ export function maybeExtendPromise(Promise) {
395395
return o(...args);
396396
}
397397
// console.log(`sending`, optKey, o[optKey], o);
398+
if (typeof o[optKey] !== 'function') {
399+
throw TypeError(`o[${JSON.stringify(optKey)}] is not a function`);
400+
}
398401
return o[optKey](...args);
399402
}),
400403
};

0 commit comments

Comments
 (0)