Skip to content

Commit

Permalink
move clear interval
Browse files Browse the repository at this point in the history
  • Loading branch information
huangjoyce3 committed Sep 9, 2019
1 parent 227de00 commit 008f5d0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/IFrameController.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ class IFrameController {
reject(new IFrameError('Silent sign-in timed out'));
}, 5 * 1000);
window.addEventListener('message', message => {
clearInterval(timer);
if (!message.data || message.data.type !== messageType) {
return;
}

clearInterval(timer);
resolve(message);
});
});
Expand Down

0 comments on commit 008f5d0

Please sign in to comment.