FileUpload remove method throwing error on Firefox #3119
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
I'm submitting a ... (check one with "x")
Current behavior
On FileUpload component, when user selects a file, it is listed within the component with a remove button which calls remove method.
this.onRemove.emit({originalEvent: event, file: this.files[index]});
On the line above, event is undefined when the method is invoked. Therefore, Firefox throws an error.
I implemented my own remove button and I call this method with index as well. It gives me the same error.
Expected behavior
It should not throw an error on undefined event, or event should be passed to the function somehow.
Minimal reproduction of the problem with instructions
You can reproduce this bug on primeng demo page. Choose a file and try to use remove button (next to the selected file)
https://www.primefaces.org/primeng/#/fileupload
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Language: [all | TypeScript X.X | ES6/7 | ES5]
Node (for AoT issues):
node --version
=The text was updated successfully, but these errors were encountered: