Skip to content

Commit

Permalink
Set user on auth state changed
Browse files Browse the repository at this point in the history
  • Loading branch information
stivaliserna committed Oct 3, 2018
1 parent 3bc5486 commit 6a55c3e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions skeleton-smart-invite.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,16 @@ class SkeletonSmartInvite extends PolymerElement {
};
}

/**
* Connected callback
*/
connectedCallback() {
super.connectedCallback();
firebase.auth().onAuthStateChanged((user) => {
this.user = user;
});
}

/**
* Validation icon
*
Expand Down Expand Up @@ -284,9 +294,7 @@ class SkeletonSmartInvite extends PolymerElement {

let finalData = data;
if (this.info) {
console.log(this.info);
finalData = Object.assign(data, this.info);
console.log(finalData);
}

if (this._validateEmail(this.value)) {
Expand Down

0 comments on commit 6a55c3e

Please sign in to comment.