Skip to content

Commit d916071

Browse files
authored
Merge pull request #5052 from AlexVelezLl/fix-resize-observer-errors
Fix ResizeObserver errors when uploading epub files
2 parents 2ed4952 + 81e34a5 commit d916071

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)