diff --git a/src/components/Viewer/Viewer.vue b/src/components/Viewer/Viewer.vue index 87961c2..f4a769c 100644 --- a/src/components/Viewer/Viewer.vue +++ b/src/components/Viewer/Viewer.vue @@ -209,8 +209,10 @@ export default { this.$refs.iframe.appendStyle(this.$options.rotateWrapperStyle) // TODO: element resize replace window resize with Observe this.handleResize = throttle(() => { + try{ this.viewportHeight = this.$refs.container.clientHeight this.viewportWidth = this.$refs.viewerScroller.clientWidth + }catch(e){} }, 100) window.addEventListener('resize', this.handleResize)