diff --git a/lib/web/mage/requirejs/resolver.js b/lib/web/mage/requirejs/resolver.js index 5088206dd31d9..6927a3205d94d 100644 --- a/lib/web/mage/requirejs/resolver.js +++ b/lib/web/mage/requirejs/resolver.js @@ -8,11 +8,11 @@ define([ ], function (_) { 'use strict'; - var context = require.s.contexts._, - execCb = context.execCb, - registry = context.registry, - callbacks = [], - retries = 10, + var context = require.s.contexts._, + execCb = context.execCb, + registry = context.registry, + callbacks = [], + retries = 10, updateDelay = 1, ready, update; @@ -28,13 +28,13 @@ define([ } /** - * Checks if provided module is rejected during load. + * Checks if provided module is registered after load. * * @param {Object} module - Module to be checked. * @return {Boolean} */ - function isRejected(module) { - return registry[module.id] && registry[module.id].error; + function isRegistered(module) { + return registry[module.id]; } /** @@ -48,7 +48,7 @@ define([ return false; } - return module.depCount > _.filter(module.depMaps, isRejected).length; + return module.depCount > _.filter(module.depMaps, isRegistered).length; } /**