Skip to content
Snippets Groups Projects
Commit fc0a1ab1 authored by Guilherme Gazzo's avatar Guilherme Gazzo Committed by GitHub
Browse files

Update oauth2-client.js

fix an logic error
parent 19fe2d91
No related branches found
No related tags found
No related merge requests found
......@@ -47,13 +47,11 @@ Template.authorize.events({
});
Template.authorize.onRendered(function() {
this.autorun((c) => {
this.autorun(c => {
const user = Meteor.user();
if (user && user.oauth && user.oauth.authorizedClients) {
if (user.oauth.authorizedClients.indexOf(this.data.client_id() > -1)) {
c.stop();
$('button[type=submit]').click();
}
if (user && user.oauth && user.oauth.authorizedClients && user.oauth.authorizedClients.includes(this.data.client_id())) {
c.stop();
$('button[type=submit]').click();
}
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment