Skip to content
This repository was archived by the owner on Aug 9, 2023. It is now read-only.

Commit 11a3709

Browse files
committed
Fix error
1 parent b3f407d commit 11a3709

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ function toH(h, node, ctx) {
188188
* @return {*} - Result of `h`.
189189
*/
190190
function wrapper(h, node, prefix) {
191+
if (typeof h !== 'function') {
192+
throw new Error('h is not a function');
193+
}
194+
191195
if (!is('element', node)) {
192196
throw new Error('Expected element, not `' + node + '`');
193197
}

0 commit comments

Comments
 (0)