@@ -51,20 +51,6 @@ define([
51
51
return module . depCount > _ . filter ( module . depMaps , isRejected ) . length ;
52
52
}
53
53
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
-
68
54
/**
69
55
* Checks if requirejs's registry object contains pending modules.
70
56
*
@@ -74,15 +60,6 @@ define([
74
60
return _ . some ( registry , isPending ) ;
75
61
}
76
62
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
-
86
63
/**
87
64
* Checks if 'resolver' module is in ready
88
65
* state and that there are no pending modules.
@@ -102,18 +79,6 @@ define([
102
79
callback . handler . call ( callback . ctx ) ;
103
80
}
104
81
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
-
117
82
/**
118
83
* Sets 'resolver' module to a ready state
119
84
* and invokes pending callbacks.
@@ -124,15 +89,6 @@ define([
124
89
callbacks . splice ( 0 ) . forEach ( invoke ) ;
125
90
}
126
91
127
- /**
128
- * Reject error
129
- */
130
- function reject ( ) {
131
- ready = true ;
132
-
133
- callbacks . splice ( 0 ) . forEach ( throwError ) ;
134
- }
135
-
136
92
/**
137
93
* Drops 'ready' flag and runs the update process.
138
94
*/
@@ -149,13 +105,11 @@ define([
149
105
* @param {Function } handler - 'Ready' event handler function.
150
106
* @param {Object } [ctx] - Optional context with which handler
151
107
* will be invoked.
152
- * @param {Function } onError - error event handler
153
108
*/
154
- function subscribe ( handler , ctx , onError ) {
109
+ function subscribe ( handler , ctx ) {
155
110
var callback = {
156
111
handler : handler ,
157
- ctx : ctx ,
158
- error : onError
112
+ ctx : ctx
159
113
} ;
160
114
161
115
if ( ! isSubscribed ( callback ) ) {
@@ -178,8 +132,6 @@ define([
178
132
update = _ . debounce ( function ( retry ) {
179
133
if ( ! hasPending ( ) ) {
180
134
retry ? update ( -- retry ) : resolve ( ) ;
181
- } else if ( hasError ( ) ) {
182
- retry ? update ( -- retry ) : reject ( ) ;
183
135
}
184
136
} , updateDelay ) ;
185
137
0 commit comments