mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
silent last extra uncaught promise
This commit is contained in:
@@ -21,15 +21,17 @@ export const loadAsyncStubHelpers = () => {
|
||||
queue = queue.finally(() => {
|
||||
fn(resolve, reject);
|
||||
|
||||
return promise.stubPromise?.catch(() => {});
|
||||
return promise.stubPromise?.catch(() => {}); // silent uncaught promise
|
||||
});
|
||||
|
||||
promise.catch(() => {}).finally(() => {
|
||||
queueSize -= 1;
|
||||
if (queueSize === 0) {
|
||||
Meteor.connection._maybeMigrate();
|
||||
}
|
||||
});
|
||||
promise
|
||||
.catch(() => {}) // silent uncaught promise
|
||||
.finally(() => {
|
||||
queueSize -= 1;
|
||||
if (queueSize === 0) {
|
||||
Meteor.connection._maybeMigrate();
|
||||
}
|
||||
});
|
||||
|
||||
promise.stubPromise = promiseProps.stubPromise;
|
||||
promise.serverPromise = promiseProps.serverPromise;
|
||||
@@ -100,11 +102,12 @@ export const loadAsyncStubHelpers = () => {
|
||||
hasStub = !!applyAsyncPromise.stubPromise;
|
||||
if (hasStub) {
|
||||
applyAsyncPromise.stubPromise
|
||||
.catch(() => {})
|
||||
.catch(() => {}) // silent uncaught promise
|
||||
.finally(() => {
|
||||
finished = true;
|
||||
});
|
||||
}
|
||||
|
||||
applyAsyncPromise
|
||||
.then((result) => {
|
||||
resolve(result);
|
||||
@@ -112,6 +115,7 @@ export const loadAsyncStubHelpers = () => {
|
||||
.catch((err) => {
|
||||
reject(err);
|
||||
});
|
||||
serverPromise.catch(() => {}); // silent uncaught promise
|
||||
});
|
||||
|
||||
Meteor._setImmediate(() => {
|
||||
|
||||
Reference in New Issue
Block a user