Skip to content

Commit bf6f0a6

Browse files
committed
fix useReducer parsing issue
1 parent cfb7e7f commit bf6f0a6

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ const saveCatchData = (request, { id: tabId, title }, subType) => {
201201
Object.keys(parsedData.useReducer).forEach((key) => {
202202
if (parsedData.useReducer[key].valueChanged) {
203203
cacheUseReducer[key] = parsedData.useReducer[key];
204+
cacheUseReducer[key].state = JSON.parse(cacheUseReducer[key].state || null);
204205
}
205206
});
206207

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export function installHook(target, settings) {
6565
if (debugObj.valueChanged) {
6666
memo[key] = {
6767
actions: debugObj.actions,
68-
state: debugObj.state,
68+
state: helpers.parseData(debugObj.state),
6969
valueChanged: debugObj.valueChanged,
7070
displayName: debugObj.displayName,
7171
};

0 commit comments

Comments
 (0)