Skip to content

Commit

Permalink
Reload iframe when the url changes
Browse files Browse the repository at this point in the history
It happens when the version changes
  • Loading branch information
chalbert committed Mar 7, 2022
1 parent 761501b commit 2096016
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/components/src/Zoom/ZoomIFrame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export class ZoomIFrame extends Component<IZoomIFrameProps> {

// this component renders an iframe, which gets updates via post-messages
// never update this component, it will cause the iframe to refresh
return false;
// the only exception is when the url changes, which happens when the version changes
return nextProps.children.props.src !== this.props.children.props.src;
}

setIframeInnerZoom(scale: number) {
Expand Down

0 comments on commit 2096016

Please sign in to comment.