ceifa / wasmoon

A real lua 5.4 VM with JS bindings made with webassembly
MIT License
496 stars 32 forks source link

Fix awaiting Promises when using with Angular #92

Closed rkristof closed 1 year ago

rkristof commented 1 year ago

The existing checks for determining if the object is actually a Promise don't work in Angular, because the native Promise implementation is patched. These additional conditions handle if the object is a ZoneAwarePromise.

I'm not sure if these additional conditions would have any side-effects, as I only tested it with Angular and I'm not very familiar with the detailed workings of the library.

This PR fixes issue #90