mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Merge pull request #13102 from meteor/waitUntilAllLoaded-safety-check
[Meteor 3] Added `waitUntilAllLoaded` safety check.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user