Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read properties of null (reading 'file') #24

Open
mchestnut opened this issue Apr 11, 2022 · 0 comments
Open

Cannot read properties of null (reading 'file') #24

mchestnut opened this issue Apr 11, 2022 · 0 comments

Comments

@mchestnut
Copy link

When using this plugin in a Vue environment, occasionally I'll receive an error of "Cannot read properties of null (reading 'file')" when the component using FilePond is destroyed. This only occurs when a file has been added to FilePond.

I've traced the error to line 142 of filepond-plugin-image-overlay.js:
if (!isImage(item.file) || root.rect.element.hidden) return;

I'm not sure what createRoute (line 134) is doing, but perhaps the solution is to return if item is falsy? In my testing that works, but not sure if that has any repercussions.

Potential fix
filepond-plugin-image-overlay.js, line 142
if (!item || !isImage(item.file) || root.rect.element.hidden) return;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant