angular/packages/zone.js/lib/common
JiaLiPassion aebf165359 fix(zone.js): should ignore multiple resolve call (#45283)
Close #44913

The following case is not handled correctly by `zone.js`.
```
const delayedPromise = new Promise((resolve) => {
  setTimeout(resolve, 1, 'timeout');
});

new Promise((resolve) => {
  resolve(delayedPromise);
  resolve('second call');
}).then(console.log);
```

It should output `timeout`, since the promise is resolved by the
1st resolve, the `second call` should be ignored.

So this is a bug that the original implementation not ensure the
`resolve` is only called once.

PR Close #45283
2022-03-25 17:31:03 -07:00
..
error-rewrite.ts refactor(zone.js): rename BlacklistedStackFrames to InternalZoneJsStackFrames (#38978) 2020-09-28 16:23:41 -04:00
events.ts build: enable useUnknownInCatchVariables (#44679) 2022-02-01 18:17:29 +00:00
fetch.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
promise.ts fix(zone.js): should ignore multiple resolve call (#45283) 2022-03-25 17:31:03 -07:00
timers.ts fix(zone.js): setTimeout patch should clean tasksByHandleId cache. (#40586) 2021-02-09 10:43:05 -08:00
to-string.ts fix(zone.js): zone.js toString patch should check typeof Promise is function (#38350) 2020-08-25 09:51:50 -07:00
utils.ts refactor: replace deprecated String.prototype.substr() (#45397) 2022-03-24 11:48:09 -07:00