Using Handsontable 1.13.0 with zone.js

Tags: #<Tag:0x00007efc64dcfa48>

We’re using Handsontable 1.10.2 in an Angular 4 app with zone.js 0.8.16. After upgrading to Handsontable Pro 1.13.0, we’re getting the following error:

Unhandled promise rejection Error: Zone.js has detected that ZoneAwarePromise (window|global).Promise has been overwritten.
Most likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)
at Function.Zone.assertZonePatched (zone.js:44)
at new NgZone (ng_zone.ts:135)
at PlatformRef_._bootstrapModuleFactoryWithZone (application_ref.ts:358)
at eval (application_ref.ts:333)
at run (handsontable.full.js:36894)
at eval (handsontable.full.js:36907)
at MutationObserver.flush (handsontable.full.js:94861)
at ZoneDelegate.invoke (zone.js:391)
at Zone.runGuarded (zone.js:154)
at MutationObserver. (zone.js:132)

Can anybody please suggest a fix?

I have searched similar topic and found this one https://stackoverflow.com/questions/44566898/zoneawarepromise-overwritten-when-adding-handsontable-to-angular-cli-scripts on SO. Can you check if the tip about main.ts file helps?

Oh, and there’s one issue at https://github.com/handsontable/handsontable/issues/4452

Our our developer proposed

try to add import 'handsontable/dist/handsontable';
before import 'zone.js/dist/zone';
in your polyfills.ts file.

Importing in polyfills.ts solved the problem, thank you!

Great! Thank you for an update.

I am closing the issue.