You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is not possible for width to have a value in mounted().
It is only onWindowResize that sets width. And onWindowResize() gets
called by mounted(), if self.$refs.item changes size (setup during
mounted()) or in the watch for 'responsive'.
In fact, there was a potential bug here. (I'm not sure how to trigger
it, but bear with me):
If a caller was to change this.responsive before mounted() was called,
onWindowResize() would be called an that would set width to a non-null
value. Because of that, these two would not be called during mount:
self.initResponsiveFeatures();
addWindowEventListener('resize', self.onWindowResize);
And they should.
So all in all mounted() should not check for self.width == null
0 commit comments