Skip to content

Commit 7bdef9f

Browse files
committed
fix(provider): quick fix for undefined provider
Since the Polymer 2.4.0 version the login-fire-button encounters an error when the properties are initialized. This is a weird period when the properties change from "unset" to the default value. The default value of default value is `undefined`. Then the computed properties are computed and binded (at this moment the default provider `anonymous` is set). What I mean is the "provider" is undefined only when the element is initialized and the default value (`anonymous`) not yet computed by Polymer. Fixes #156
1 parent ed8afcc commit 7bdef9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

login-fire-button.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@
263263
*/
264264
_computeButtonText: function(provider, showSignUp, noSignIn, noSignOut, signedIn, localize, language) {
265265
// User logged in.
266-
if (noSignIn || (!noSignOut && signedIn)) {
266+
if (noSignIn || (!noSignOut && signedIn) || !provider) {
267267
return localize('lf-signout');
268268
}
269269

0 commit comments

Comments
 (0)