Skip to content

Commit 81e34a5

Browse files
committed
Destroy epub book on unmount
1 parent 2cbc595 commit 81e34a5

File tree

1 file changed

+9
-0
lines changed
  • contentcuration/contentcuration/frontend/channelEdit/views/files

1 file changed

+9
-0
lines changed

contentcuration/contentcuration/frontend/channelEdit/views/files/EpubRenderer.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,15 @@
8181
});
8282
}); // There seems to be some lag for loading, so add delay to be safe
8383
},
84+
beforeDestroy() {
85+
if (this.book) {
86+
/**
87+
* Destroy the book instance to remove listeners that causes some
88+
* ResizeObserver errors in the console on unmount.
89+
*/
90+
this.book.destroy();
91+
}
92+
},
8493
};
8594
8695
</script>

0 commit comments

Comments
 (0)