dce-reactkit 3.4.0-beta.4 → 3.4.0-beta.5
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/cjs/index.js +6 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +6 -11
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/client/initClient.tsx +12 -20
package/dist/esm/index.js
CHANGED
|
@@ -553,22 +553,17 @@ let storedSendRequest;
|
|
|
553
553
|
* @returns sendRequest function
|
|
554
554
|
*/
|
|
555
555
|
const getSendRequest = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
556
|
-
//
|
|
557
|
-
let
|
|
556
|
+
// Show timeout error if too much time passes
|
|
557
|
+
let successful = false;
|
|
558
558
|
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
559
559
|
yield waitMs(5000);
|
|
560
|
-
|
|
560
|
+
if (!successful) {
|
|
561
|
+
showFatalError(new ErrorWithCode('Could not send a request because the request needed to be sent before dce-reactkit was properly initialized. Perhaps dce-reactkit was not initialized with initClient.', ReactKitErrorCode$1.NoCACCLSendRequestFunction));
|
|
562
|
+
}
|
|
561
563
|
}))(),
|
|
562
564
|
// Wait for initialization
|
|
563
565
|
yield initialized;
|
|
564
|
-
|
|
565
|
-
if (timedOut) {
|
|
566
|
-
showFatalError(new ErrorWithCode('Could not send a request because the request needed to be sent before dce-reactkit was properly initialized. Perhaps dce-reactkit was not initialized with initClient.', ReactKitErrorCode$1.NoCACCLSendRequestFunction));
|
|
567
|
-
// Return dummy function that never resolves
|
|
568
|
-
return (() => {
|
|
569
|
-
return new Promise(() => { });
|
|
570
|
-
});
|
|
571
|
-
}
|
|
566
|
+
successful = true;
|
|
572
567
|
// Return
|
|
573
568
|
return storedSendRequest;
|
|
574
569
|
});
|