You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-05 23:10:41 +03:00
Use typeof to check for presence of parameters
Signed-off-by: Robin Townsend <robin@robin.town>
This commit is contained in:
@@ -175,7 +175,7 @@ export default class ImageView extends React.Component<IProps, IState> {
|
|||||||
translationX: 0,
|
translationX: 0,
|
||||||
translationY: 0,
|
translationY: 0,
|
||||||
});
|
});
|
||||||
} else if (zoomX === undefined && zoomY === undefined) {
|
} else if (typeof zoomX !== "number" && typeof zoomY !== "number") {
|
||||||
// Zoom relative to the center of the view
|
// Zoom relative to the center of the view
|
||||||
this.setState({
|
this.setState({
|
||||||
zoom: newZoom,
|
zoom: newZoom,
|
||||||
|
|||||||
Reference in New Issue
Block a user