uploadcare / ngx-uploadcare-widget

Angular 2+ wrapper for Uploadcare Widget
MIT License
15 stars 10 forks source link

this.renderer.destroyNode is not a function on production build #26

Closed TwunTee closed 5 years ago

TwunTee commented 6 years ago

The widget works fine when built using dev. When it is built for production I am getting an error """ this.renderer.destroyNode is not a function """ It happens after the file is uploaded. destroyNode function can be null during production as per angular docs. An stackoverflow thread with similar issue https://stackoverflow.com/questions/44465653/what-is-the-correct-way-to-destroy-an-element-created-with-renderer2

TwunTee commented 6 years ago

@bautrukevich @ZNick1982 can someone look into this please? I fixed this issue using the solution from stackoverflow but not sure which npm script to run to create a release version.

ZNick1982 commented 6 years ago

Hello @TwunTee Thanks for reporting this. I will take a look.

Kind regards, Nikolay Zherdev

ZNick1982 commented 5 years ago

Hello @TwunTee Fixed in https://github.com/uploadcare/ngx-uploadcare-widget/tree/v1.2.2_node_fix Can you please check?

Kind regards, Nikolay Zherdev.

TwunTee commented 5 years ago

The error is fixed!