web-manager 3.1.47 → 3.1.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +3 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -262,19 +262,18 @@ function Manager() {
262
262
  function _authHandle_in(This, user) {
263
263
  // This.log('_authHandle_in', user);
264
264
  // if (This.properties.page.status.didSignUp) {
265
- var didSignUp = 'auth.didSignUp';
266
265
  var done;
267
266
  var hoursSinceCreation = Math.abs(new Date() - new Date(+user.metadata.createdAt)) / 36e5;
268
267
 
269
268
  function _done() {
270
269
  if (!done) {
271
270
  done = true;
272
- store.set(didSignUp, true)
271
+ store.set('didSignUp', true)
273
272
  _authHandle_in_normal(This, user);
274
273
  }
275
274
  }
276
275
 
277
- if (!store.get(didSignUp) && hoursSinceCreation < 0.5) {
276
+ if (!store.get('didSignUp') && hoursSinceCreation < 0.5) {
278
277
  user.getIdToken(false)
279
278
  .then(function(token) {
280
279
 
@@ -695,7 +694,7 @@ function Manager() {
695
694
  // console.log('HERE 5');
696
695
 
697
696
  // handle firebase user
698
- if (firebase.auth) {
697
+ if (typeof firebase !== 'undefined' && firebase.auth) {
699
698
  firebase.auth().onAuthStateChanged(function(user) {
700
699
  This.properties.page.status.authReady = true;
701
700
  This.properties.auth.user = user || false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-manager",
3
- "version": "3.1.47",
3
+ "version": "3.1.49",
4
4
  "description": "Easily access important variables such as the query string, current domain, and current page in a single object.",
5
5
  "main": "index.js",
6
6
  "scripts": {