@@ -51,20 +51,6 @@ define([
5151 return module . depCount > _ . filter ( module . depMaps , isRejected ) . length ;
5252 }
5353
54- /**
55- * Checks if provided module has errors.
56- *
57- * @param {Object } module - Module to be checked.
58- * @returns {Boolean }
59- */
60- function isError ( module ) {
61- if ( ! module . depCount ) {
62- return false ;
63- }
64-
65- return _ . filter ( module . depMaps , isRejected ) . length > 0 ;
66- }
67-
6854 /**
6955 * Checks if requirejs's registry object contains pending modules.
7056 *
@@ -74,15 +60,6 @@ define([
7460 return _ . some ( registry , isPending ) ;
7561 }
7662
77- /**
78- * Checks if requirejs's registry object contains errors.
79- *
80- * @returns {Boolean }
81- */
82- function hasError ( ) {
83- return _ . some ( registry , isError ) ;
84- }
85-
8663 /**
8764 * Checks if 'resolver' module is in ready
8865 * state and that there are no pending modules.
@@ -102,18 +79,6 @@ define([
10279 callback . handler . call ( callback . ctx ) ;
10380 }
10481
105- /**
106- * Throws error handler.
107- *
108- * @param {Object } callback
109- */
110- function throwError ( callback ) {
111-
112- if ( callback . error ) {
113- callback . error . call ( callback . ctx ) ;
114- }
115- }
116-
11782 /**
11883 * Sets 'resolver' module to a ready state
11984 * and invokes pending callbacks.
@@ -124,15 +89,6 @@ define([
12489 callbacks . splice ( 0 ) . forEach ( invoke ) ;
12590 }
12691
127- /**
128- * Reject error
129- */
130- function reject ( ) {
131- ready = true ;
132-
133- callbacks . splice ( 0 ) . forEach ( throwError ) ;
134- }
135-
13692 /**
13793 * Drops 'ready' flag and runs the update process.
13894 */
@@ -149,13 +105,11 @@ define([
149105 * @param {Function } handler - 'Ready' event handler function.
150106 * @param {Object } [ctx] - Optional context with which handler
151107 * will be invoked.
152- * @param {Function } onError - error event handler
153108 */
154- function subscribe ( handler , ctx , onError ) {
109+ function subscribe ( handler , ctx ) {
155110 var callback = {
156111 handler : handler ,
157- ctx : ctx ,
158- error : onError
112+ ctx : ctx
159113 } ;
160114
161115 if ( ! isSubscribed ( callback ) ) {
@@ -178,8 +132,6 @@ define([
178132 update = _ . debounce ( function ( retry ) {
179133 if ( ! hasPending ( ) ) {
180134 retry ? update ( -- retry ) : resolve ( ) ;
181- } else if ( hasError ( ) ) {
182- retry ? update ( -- retry ) : reject ( ) ;
183135 }
184136 } , updateDelay ) ;
185137
0 commit comments