securityos/node_modules/next/dist/client/components/infinite-promise.js

34 lines
1.0 KiB
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
/**
* Used to cache in createInfinitePromise
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "createInfinitePromise", {
enumerable: true,
get: function() {
return createInfinitePromise;
}
});
let infinitePromise;
function createInfinitePromise() {
if (!infinitePromise) {
// Only create the Promise once
infinitePromise = new Promise(()=>{
// This is used to debug when the rendering is never updated.
// setTimeout(() => {
// infinitePromise = new Error('Infinite promise')
// resolve()
// }, 5000)
});
}
return infinitePromise;
}
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=infinite-promise.js.map