@next-core/brick-kit 2.189.0 → 2.190.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.bundle.js
CHANGED
|
@@ -5848,9 +5848,10 @@
|
|
|
5848
5848
|
if (!shouldStop) {
|
|
5849
5849
|
var _computeRealValue2;
|
|
5850
5850
|
var _result = yield task();
|
|
5851
|
+
var expectPollStopImmediatelyResult = (_computeRealValue2 = computeRealValue(expectPollStopImmediately, context)) === null || _computeRealValue2 === void 0 ? void 0 : _computeRealValue2();
|
|
5851
5852
|
// Stop polling immediately when the expectation is match or a different router
|
|
5852
5853
|
// is rendering after the task processed.
|
|
5853
|
-
shouldStop =
|
|
5854
|
+
shouldStop = expectPollStopImmediatelyResult || currentRenderId !== _internalApiGetRouterRenderId();
|
|
5854
5855
|
if (!shouldStop) {
|
|
5855
5856
|
var _computeRealValue3;
|
|
5856
5857
|
progress === null || progress === void 0 ? void 0 : progress(_result);
|
|
@@ -5864,13 +5865,18 @@
|
|
|
5864
5865
|
} else {
|
|
5865
5866
|
delayedPoll(interval !== null && interval !== void 0 ? interval : 3000);
|
|
5866
5867
|
}
|
|
5868
|
+
} else if (expectPollStopImmediatelyResult) {
|
|
5869
|
+
finallyCallback === null || finallyCallback === void 0 ? void 0 : finallyCallback();
|
|
5867
5870
|
}
|
|
5871
|
+
} else {
|
|
5872
|
+
finallyCallback === null || finallyCallback === void 0 ? void 0 : finallyCallback();
|
|
5868
5873
|
}
|
|
5869
5874
|
} catch (e) {
|
|
5870
5875
|
var _computeRealValue4;
|
|
5876
|
+
var _expectPollStopImmediatelyResult = (_computeRealValue4 = computeRealValue(expectPollStopImmediately, context)) === null || _computeRealValue4 === void 0 ? void 0 : _computeRealValue4();
|
|
5871
5877
|
// Stop polling immediately when the expectation is match or a different router
|
|
5872
5878
|
// is rendering after the task processed.
|
|
5873
|
-
shouldStop =
|
|
5879
|
+
shouldStop = _expectPollStopImmediatelyResult || currentRenderId !== _internalApiGetRouterRenderId();
|
|
5874
5880
|
if (!shouldStop) {
|
|
5875
5881
|
error === null || error === void 0 ? void 0 : error(e);
|
|
5876
5882
|
if (continueOnError) {
|
|
@@ -5878,6 +5884,8 @@
|
|
|
5878
5884
|
} else {
|
|
5879
5885
|
finallyCallback === null || finallyCallback === void 0 ? void 0 : finallyCallback();
|
|
5880
5886
|
}
|
|
5887
|
+
} else if (_expectPollStopImmediatelyResult) {
|
|
5888
|
+
finallyCallback === null || finallyCallback === void 0 ? void 0 : finallyCallback();
|
|
5881
5889
|
}
|
|
5882
5890
|
} finally {
|
|
5883
5891
|
// Manually dispatch an event of `request.end` when the polling is stopped immediately.
|