@@ -445,23 +445,11 @@ Worker.prototype.thenCore = function thenCore(onFulfilled, onRejected, thenBase)
445
445
return Worker . convert ( returnVal , self . __proto__ ) ;
446
446
} ;
447
447
448
- Worker . prototype [ 'catch' ] = function ( onRejected ) {
449
- // Bind `this` to the promise handler, call `catch`, and return a Worker.
450
- if ( onRejected ) { onRejected = onRejected . bind ( this ) ; }
451
- var returnVal = Promise . prototype [ 'catch' ] . call ( this , onRejected ) ;
452
- return Worker . convert ( returnVal , this ) ;
453
- } ;
454
-
455
448
Worker . prototype . thenExternal = function thenExternal ( onFulfilled , onRejected ) {
456
449
// Call `then` and return a standard promise (exits the Worker chain).
457
450
return Promise . prototype . then . call ( this , onFulfilled , onRejected ) ;
458
451
} ;
459
452
460
- Worker . prototype . catchExternal = function catchExternal ( onRejected ) {
461
- // Call `catch` and return a standard promise (exits the Worker chain).
462
- return Promise . prototype [ 'catch' ] . call ( this , onRejected ) ;
463
- } ;
464
-
465
453
Worker . prototype . thenList = function thenList ( fns ) {
466
454
// Queue a series of promise 'factories' into the promise chain.
467
455
var self = this ;
@@ -471,6 +459,18 @@ Worker.prototype.thenList = function thenList(fns) {
471
459
return self ;
472
460
} ;
473
461
462
+ Worker . prototype [ 'catch' ] = function ( onRejected ) {
463
+ // Bind `this` to the promise handler, call `catch`, and return a Worker.
464
+ if ( onRejected ) { onRejected = onRejected . bind ( this ) ; }
465
+ var returnVal = Promise . prototype [ 'catch' ] . call ( this , onRejected ) ;
466
+ return Worker . convert ( returnVal , this ) ;
467
+ } ;
468
+
469
+ Worker . prototype . catchExternal = function catchExternal ( onRejected ) {
470
+ // Call `catch` and return a standard promise (exits the Worker chain).
471
+ return Promise . prototype [ 'catch' ] . call ( this , onRejected ) ;
472
+ } ;
473
+
474
474
Worker . prototype . error = function error ( msg ) {
475
475
// Throw the error in the Promise chain.
476
476
return this . then ( function error_main ( ) {
0 commit comments