Skip to content

Commit

Permalink
Fix debug not forwarding all options._hook args
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister committed Apr 19, 2020
1 parent 113d1fa commit 61279d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions debug/src/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,12 @@ export function initDebug() {
if (oldBeforeDiff) oldBeforeDiff(vnode);
};

options._hook = comp => {
options._hook = (comp, index, type) => {
if (!comp) {
throw new Error('Hook can only be invoked from render methods.');
}

if (oldHook) oldHook(comp);
if (oldHook) oldHook(comp, index, type);
};

const warn = (property, err) => ({
Expand Down

0 comments on commit 61279d7

Please sign in to comment.