Skip to content

Commit

Permalink
fix(preset): mobile demo cannot switch bug (#976)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript committed Dec 14, 2021
1 parent 98a19b7 commit aa911c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/preset-dumi/src/plugins/features/demo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export default (api: IApi) => {
// update render args when props changed
React.useLayoutEffect(() => {
setRenderArgs(getDemoRenderArgs(props, demos));
}, [props.uuid, props.wrapper, props.capture]);
}, [props.match.params.uuid, props.location.query.wrapper, props.location.query.capture]);
// for listen prefers-color-schema media change in demo single route
usePrefersColor();
Expand Down

0 comments on commit aa911c2

Please sign in to comment.