@@ -82,7 +82,7 @@ function EventSource(url, eventSourceInitDict) {
8282 function onConnectionClosed ( message ) {
8383 if ( readyState === EventSource . CLOSED ) return ;
8484 readyState = EventSource . CONNECTING ;
85- _emit ( 'error' , new Event ( 'error' , { message : message } ) ) ;
85+ _emit ( 'error' , new Event ( 'error' , { message : message } ) ) ;
8686
8787 // The url may have been changed by a temporary redirect. If that's the case,
8888 // revert it now, and flag that we are no longer pointing to a new origin
@@ -177,7 +177,7 @@ function EventSource(url, eventSourceInitDict) {
177177 self . connectionInProgress = false ;
178178 // Handle HTTP errors
179179 if ( res . statusCode === 500 || res . statusCode === 502 || res . statusCode === 503 || res . statusCode === 504 ) {
180- _emit ( 'error' , new Event ( 'error' , { status : res . statusCode , message : res . statusMessage } ) ) ;
180+ _emit ( 'error' , new Event ( 'error' , { status : res . statusCode , message : res . statusMessage } ) ) ;
181181 onConnectionClosed ( ) ;
182182 return ;
183183 }
@@ -187,7 +187,7 @@ function EventSource(url, eventSourceInitDict) {
187187 var location = res . headers . location ;
188188 if ( ! location ) {
189189 // Server sent redirect response without Location header.
190- _emit ( 'error' , new Event ( 'error' , { status : res . statusCode , message : res . statusMessage } ) ) ;
190+ _emit ( 'error' , new Event ( 'error' , { status : res . statusCode , message : res . statusMessage } ) ) ;
191191 return ;
192192 }
193193 var prevOrigin = getOrigin ( url ) ;
@@ -200,7 +200,7 @@ function EventSource(url, eventSourceInitDict) {
200200 }
201201
202202 if ( res . statusCode !== 200 ) {
203- _emit ( 'error' , new Event ( 'error' , { status : res . statusCode , message : res . statusMessage } ) ) ;
203+ _emit ( 'error' , new Event ( 'error' , { status : res . statusCode , message : res . statusMessage } ) ) ;
204204 return self . close ( ) ;
205205 }
206206
@@ -386,9 +386,9 @@ EventSource.prototype.constructor = EventSource; // make stacktraces readable
386386/**
387387 * Ready states
388388 */
389- Object . defineProperty ( EventSource , 'CONNECTING' , { enumerable : true , value : 0 } ) ;
390- Object . defineProperty ( EventSource , 'OPEN' , { enumerable : true , value : 1 } ) ;
391- Object . defineProperty ( EventSource , 'CLOSED' , { enumerable : true , value : 2 } ) ;
389+ Object . defineProperty ( EventSource , 'CONNECTING' , { enumerable : true , value : 0 } ) ;
390+ Object . defineProperty ( EventSource , 'OPEN' , { enumerable : true , value : 1 } ) ;
391+ Object . defineProperty ( EventSource , 'CLOSED' , { enumerable : true , value : 2 } ) ;
392392
393393EventSource . prototype . CONNECTING = 0 ;
394394EventSource . prototype . OPEN = 1 ;
0 commit comments