hypernova icon indicating copy to clipboard operation
hypernova copied to clipboard

Fix promise global pollution

Open kmsheng opened this issue 4 years ago • 1 comments

hypernova pollutes the global.Promise with bluebird's. This will cause unwanted behaviors for application which uses other libraries that also use native Promise object.

This PR intends to remove direct assignment to global.Promise and keeps hypernova run as before by the followings:

  1. Copy Promise related declaration code from environment.js to promise.js
  2. Add import Promise statements to files which invoke Promise which will feed them with bluebird's Promise as before
  3. remove Promise related code and global assignment from environment.js

kmsheng avatar May 28 '20 12:05 kmsheng

Related issues: #201 , #135

espretto avatar Jan 09 '23 12:01 espretto