Skip to content

Commit

Permalink
fix(hooks): Stricter condition (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
bertho-zero authored Dec 2, 2020
1 parent 4ff10a9 commit 6de77a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/hooks/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class HookManager {

if (params) {
params.forEach((name, index) => {
if (props?.[name]) {
if (props?.[name] !== undefined) {
throw new Error(`Hooks can not have a property and param named '${name}'. Use .defaults instead.`);
}

Expand Down

0 comments on commit 6de77a1

Please sign in to comment.