Skip to content

Commit ffa3dc3

Browse files
Merge pull request #6 from functionalland/feature/types
Fix bug with components that don't have an initial callback function
2 parents 093a1a5 + f96591f commit ffa3dc3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ journal/
1313
*.zip
1414

1515
.todo.md
16+
17+
build/

library/component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ export const useCallbacks = <
660660
configurable: true,
661661
enumerable: true,
662662
value(...xs: [string, string, string]) {
663-
return maybeCall(() => g.call(this, ...xs))
663+
return maybeCall(() => g && g.call(this, ...xs))
664664
.then(() =>
665665
f(
666666
this,

0 commit comments

Comments
 (0)