use-lunch-money
Advanced tools
Comparing version 1.1.2 to 1.1.3
{ | ||
"name": "use-lunch-money", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Lunch Money profile react hook", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -23,5 +23,6 @@ "use strict"; | ||
(0, _react.useEffect)(function () { | ||
if (!window || !window.LunchMoney) return; | ||
try { | ||
window.LunchMoney.getProfile(); | ||
var profile = window.LunchMoney && window.LunchMoney.profile || undefined; | ||
var profile = window.LunchMoney.profile; | ||
if (profile) { | ||
@@ -33,3 +34,3 @@ setLmLocalUser(profile); | ||
} | ||
}, [window.LunchMoney.profile]); | ||
}, [window.LunchMoney]); | ||
return lmLocalUser; | ||
@@ -36,0 +37,0 @@ }; |
4169
63