Describe the bug
Using vue-filepond with the pdf preview plugin, sometimes the stacktraced error occurs on route change.
To Reproduce
1) Uploading an image
2) Waiting for it to succeed
3) Navigating away from the current route
4) Going back to upload view
5) Remove current image
6) Upload new image
7) Navigate away from current route
Expected behavior
No console TypeError.
Stacktraces
Uncaught TypeError: Cannot read property 'file' of null
at filepond-plugin-pdf-preview.js:181
at filepond.js:1445
at filepond.js:1096
at Array.forEach (<anonymous>)
at Object._write (filepond.js:1095)
at filepond.js:1125
at Array.forEach (<anonymous>)
at Object._write (filepond.js:1123)
at filepond.js:1125
at Array.forEach (<anonymous>)
Information about your project:
Windows 10
Google Chrome - Version 89.0.4389.90 (64-Bit)
Additional context
I tried "resolving/catching" this error in the beforeDestroy() life-cycle hook of the component holding vue-filepond, but the this.$refs is already undefined at that point.
Describe the bug Using vue-filepond with the pdf preview plugin, sometimes the stacktraced error occurs on route change.
To Reproduce 1) Uploading an image 2) Waiting for it to succeed 3) Navigating away from the current route 4) Going back to upload view 5) Remove current image 6) Upload new image 7) Navigate away from current route
Expected behavior No console TypeError.
Stacktraces
Information about your project: Windows 10 Google Chrome - Version 89.0.4389.90 (64-Bit)
Additional context I tried "resolving/catching" this error in the beforeDestroy() life-cycle hook of the component holding vue-filepond, but the this.$refs is already undefined at that point.