Skip to content

Commit 90ea03e

Browse files
committed
fix NPE issue
1 parent e9cf80c commit 90ea03e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • packages/devtool-extenstion/extension/core

packages/devtool-extenstion/extension/core/hook.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ export function installHook(target) {
9696
* @param {object} hook
9797
*/
9898
const doWorkWithHooks = (hook) => {
99-
if (hook.__reactContextDevtoolHookType == "useReducer") {
99+
if (
100+
hook.__reactContextDevtoolHookType == "useReducer" &&
101+
hook.queue.lastRenderedReducer
102+
) {
100103
let debugId = hook.queue.__reactContextDevtoolDebugId;
101104

102105
if (!debugId) {

0 commit comments

Comments
 (0)