Skip to content

Commit

Permalink
fix(Viewer): remove outdated fix from stable16.
Browse files Browse the repository at this point in the history
This broke the viewer resize and is not needed anymore.

In order to confirm this is not needed
i replaced the `beforeMount` handler with a `console.info` call
opened a text in the viewer and resized the window a few times.
The provided info only showed up once.
So the `ViewerComponent` was only mounted once as well.

Fixes #4099.

Signed-off-by: Max <[email protected]>
  • Loading branch information
max-nextcloud committed May 4, 2023
1 parent 141ddd1 commit eeb2f81
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/components/ViewerComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ export default {
default: false,
},
},
beforeMount() {
// FIXME Dirty fix to avoid recreating the component on stable16
if (typeof this.$parent.$parent !== 'undefined' && this.$parent.$parent.onResize) {
window.removeEventListener('resize', this.$parent.$parent.onResize)
}
},
}
</script>
<style lang="scss" scoped>
Expand Down

0 comments on commit eeb2f81

Please sign in to comment.