Merge pull request #13102 from meteor/waitUntilAllLoaded-safety-check

[Meteor 3] Added `waitUntilAllLoaded` safety check.
This commit is contained in:
Denilson
2024-05-03 14:17:55 -04:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -122,7 +122,7 @@ function checkAsyncModule (exports) {
// For this to be accurate, all linked files must be queued before calling this
// If all are loaded, returns null. Otherwise, returns a promise
function waitUntilAllLoaded() {
if (pending.length === 0) {
if (pending.length === 0 && !isProcessing) {
// All packages are loaded
// If there were no async packages, then there might not be a promise
// polyfill loaded either, so we don't create a promise to return

View File

@@ -61,7 +61,7 @@ const hasOwn = Object.prototype.hasOwnProperty;
// Cache the (slightly post-processed) results of linker.fullLink.
const CACHE_SIZE = process.env.METEOR_LINKER_CACHE_SIZE || 1024*1024*100;
const CACHE_DEBUG = !! process.env.METEOR_TEST_PRINT_LINKER_CACHE_DEBUG;
const LINKER_CACHE_SALT = 25; // Increment this number to force relinking.
const LINKER_CACHE_SALT = 26; // Increment this number to force relinking.
const LINKER_CACHE = new LRU({
max: CACHE_SIZE,
// Cache is measured in bytes. We don't care about servePath.