Skip to content

Commit

Permalink
fix: Silent throw for state sync (#674)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoattal authored Feb 4, 2024
1 parent 52253d3 commit 4c11f6d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/histoire-shared/src/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ export function applyState (target: any, state: any, override = false) {
if (!override && target[key] && !key.startsWith('_h') && typeof target[key] === 'object' && !Array.isArray(target[key])) {
Object.assign(target[key], state[key])
} else {
target[key] = state[key]
try {
target[key] = state[key]
} catch (e) {
// noop
}
}
}
}

0 comments on commit 4c11f6d

Please sign in to comment.