We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e7eb3d commit 5f7d0faCopy full SHA for 5f7d0fa
src/components/observables/QResizeObservable.js
@@ -10,11 +10,17 @@ export default {
10
},
11
methods: {
12
onResize () {
13
- const size = {
14
- width: this.parent.offsetWidth,
15
- height: this.parent.offsetHeight
+ if (!this.$el || !this.$el.parentNode) {
+ return
16
}
17
+ const
18
+ parent = this.$el.parentNode,
19
+ size = {
20
+ width: parent.offsetWidth,
21
+ height: parent.offsetHeight
22
+ }
23
+
24
if (size.width === this.size.width && size.height === this.size.height) {
25
return
26
@@ -54,7 +60,6 @@ export default {
54
60
this.url = ie ? null : 'about:blank'
55
61
56
62
mounted () {
57
- this.parent = this.$el.parentNode
58
63
this.size = { width: -1, height: -1 }
59
64
this.trigger()
65
0 commit comments