diff options
Diffstat (limited to 'frontend/site/projects/museum/views/landscape.warning.js')
| -rw-r--r-- | frontend/site/projects/museum/views/landscape.warning.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/frontend/site/projects/museum/views/landscape.warning.js b/frontend/site/projects/museum/views/landscape.warning.js index 7f03724..a0b6e64 100644 --- a/frontend/site/projects/museum/views/landscape.warning.js +++ b/frontend/site/projects/museum/views/landscape.warning.js @@ -21,6 +21,7 @@ export default class LandscapeWarning extends Component { state = { landscape: !isMobile || window.innerWidth > window.innerHeight, } + constructor(props) { super(props) this.handleResize = this.handleResize.bind(this) @@ -31,7 +32,7 @@ export default class LandscapeWarning extends Component { } handleResize() { - const landscape = window.innerWidth > window.innerHeight + const landscape = !isMobile || window.innerWidth > window.innerHeight if (landscape !== this.state.landscape) { this.setState({ landscape }) } |
