File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 554554 }
555555 else if ( principal [ "_doc" ] )
556556 {
557- identifiers [ "domain" ] = defaultDomainId ;
557+ identifiers [ "domain" ] = principal [ "domainId" ] ;
558+ if ( ! identifiers [ "domain" ] ) {
559+ identifiers [ "domain" ] = defaultDomainId ;
560+ }
558561 identifiers [ "principal" ] = principal [ "_doc" ] ;
559562 }
560563 else if ( principal [ "name" ] )
561564 {
562- identifiers [ "domain" ] = defaultDomainId ;
565+ identifiers [ "domain" ] = principal [ "domainId" ] ;
566+ if ( ! identifiers [ "domain" ] ) {
567+ identifiers [ "domain" ] = defaultDomainId ;
568+ }
563569 identifiers [ "principal" ] = principal [ "name" ] ;
564570 }
565571
Original file line number Diff line number Diff line change 238238 {
239239 window . setTimeout ( function ( ) {
240240
241- Chain ( chainable ) . readJob ( jobId ) . then ( function ( ) {
241+ Chain ( chainable ) . trap ( function ( e ) {
242+ if ( e ) { console . log ( e ) ; }
243+ callback ( null , e ) ;
244+ return false ;
245+ } ) . readJob ( jobId ) . then ( function ( ) {
242246
243247 if ( progressCallback && Gitana . isFunction ( progressCallback ) ) {
244248 progressCallback ( this ) ;
245249 }
246250
247- if ( this . state == "FINISHED" ) {
251+ if ( this . state === "FINISHED" ) {
248252 callback ( this ) ;
249253 chainable . next ( ) ;
250- } else if ( this . state == "ERROR" ) {
254+ } else if ( this . state === "ERROR" ) {
251255 callback ( this ) ;
252256 chainable . next ( ) ;
253257 } else {
You can’t perform that action at this time.
0 commit comments