Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Commit

Permalink
Add a then() function to ribbon.js deferred
Browse files Browse the repository at this point in the history
  • Loading branch information
lance committed Dec 8, 2015
1 parent 42c4002 commit ab6af82
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ribbon-webapp/runtime/src/main/resources/ribbon.js
Expand Up @@ -39,7 +39,7 @@ var ribbon = (function() {

if (!keycloak) {
// If we're not authenticating, go ahead and make the request
return doRequest( settings ).promise;
return doRequest( settings );
} else if (!keycloak.authenticated) {
// But if we are authenticating...
return deferredResult.reject("Not authenticated").promise;
Expand Down Expand Up @@ -350,7 +350,8 @@ var ribbon = (function() {
return {
promise: p,
resolve: resolve,
reject: reject
reject: reject,
then: p.then
};
};
return factory;
Expand Down

0 comments on commit ab6af82

Please sign in to comment.