Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
Revert window.Promise back to native

I have a JS library (lets call it library 'a') which is an angular app component and is served through a CDN. I also have another library (let call it library 'b') which was written in typescript and transpiled down to es6.

I am loading both these libraries inside of a .Net MVC Knockoutjs application. I am facing an issue, when I load library 'a' it modifies native promises, and library 'b' relies on native promises to perform operations inside it.

If I remove library 'a' from the page and only load library 'b' it works fine.

When I only load library 'b' this is what window.Promise looks like -

enter image description here

When I load library 'a' this is what window.Promise looks like -

enter image description here

And after loading library 'a' if I load library 'b', the Promises inside this library 'b' begins to fail. Seems like all instanceof Promise evaluate to false even if it is a Promise

See below - enter image description here

This is from library 'b'

I am loading these libraries on a user click and add it to DOM using jquery $getScript('', ()=> {})

I am wondering, if there's a way to revert window.Promise back to the native, when I am about to load library 'b'

I am pretty new to Promises, any help is appreciated.

Thanks.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!