Skip to content

Commit

Permalink
Update a life cycle call causing an issue with testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-wu committed Feb 28, 2024
1 parent 123b89d commit 9deadec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -9,3 +9,4 @@ cypress/videos
results
cypress/screenshots/
cypress/reports/
test/src/
12 changes: 7 additions & 5 deletions src/components/ResizeSensor.vue
Expand Up @@ -19,16 +19,18 @@ export default {
}
},
deactivate: function() {
this._sensor.detach(this.$refs.display, this.displayResize);
delete this._sensor;
this._sensor = undefined;
this.displayResize();
if (this._sensor) {
this._sensor.detach(this.$refs.display, this.displayResize);
delete this._sensor;
this._sensor = undefined;
this.displayResize();
}
},
displayResize: function() {
this.$emit("resize");
},
},
beforeUnmount() {
unmounted() {
this.deactivate();
},
activated() {
Expand Down

0 comments on commit 9deadec

Please sign in to comment.