croods-auth
Advanced tools
Comparing version
@@ -311,5 +311,3 @@ import React, { useState, useCallback, useEffect, useLayoutEffect, useRef } from 'react'; | ||
if (headers.accessToken) { | ||
if (!fetchingInfo) { | ||
actions.fetch({})(); | ||
} | ||
actions.fetch({})(); | ||
} else { | ||
@@ -319,3 +317,3 @@ setStatus('visitor'); | ||
} | ||
}, [actions, opts, fetchingInfo]); | ||
}, [actions, opts]); | ||
useEffect(function () { | ||
@@ -325,5 +323,5 @@ if (info) { | ||
} else { | ||
initFetch(); | ||
fetchingInfo || initFetch(); | ||
} | ||
}, [info]); | ||
}, [info, fetchingInfo]); | ||
return [{ | ||
@@ -330,0 +328,0 @@ currentUser: info, |
@@ -318,5 +318,3 @@ 'use strict'; | ||
if (headers.accessToken) { | ||
if (!fetchingInfo) { | ||
actions.fetch({})(); | ||
} | ||
actions.fetch({})(); | ||
} else { | ||
@@ -326,3 +324,3 @@ setStatus('visitor'); | ||
} | ||
}, [actions, opts, fetchingInfo]); | ||
}, [actions, opts]); | ||
React.useEffect(function () { | ||
@@ -332,5 +330,5 @@ if (info) { | ||
} else { | ||
initFetch(); | ||
fetchingInfo || initFetch(); | ||
} | ||
}, [info]); | ||
}, [info, fetchingInfo]); | ||
return [{ | ||
@@ -337,0 +335,0 @@ currentUser: info, |
{ | ||
"name": "croods-auth", | ||
"version": "3.3.1-beta.1", | ||
"version": "3.3.1-beta.2", | ||
"description": "Authentication made easy with Croods", | ||
@@ -5,0 +5,0 @@ "author": "SeasonedSoftware", |
315201
-0.01%1887
-0.21%