Skip to content

Commit

Permalink
resolve leaked promise IdentityModel#726
Browse files Browse the repository at this point in the history
  • Loading branch information
brockallen committed Jan 29, 2021
1 parent 2fea102 commit ffed9a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SessionMonitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class SessionMonitor {
this._userManager.events.addUserLoaded(this._start.bind(this));
this._userManager.events.addUserUnloaded(this._stop.bind(this));

this._userManager.getUser().then(user => {
Promise.resolve(this._userManager.getUser().then(user => {
// doing this manually here since calling getUser
// doesn't trigger load event.
if (user) {
Expand All @@ -47,7 +47,7 @@ export class SessionMonitor {
}).catch(err => {
// catch to suppress errors since we're in a ctor
Log.error("SessionMonitor ctor: error from getUser:", err.message);
});
}));
}

get _settings() {
Expand Down

0 comments on commit ffed9a5

Please sign in to comment.