@patch-adams/core 1.4.32 → 1.4.33

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.
package/dist/cli.js CHANGED
@@ -1625,8 +1625,8 @@ function generateLrsBridgeCode(options) {
1625
1625
  var cached = localStorage.getItem(cacheKey);
1626
1626
  if (cached) {
1627
1627
  var parsed = JSON.parse(cached);
1628
- // TTL: 7 days = 604800000 ms
1629
- if (parsed.timestamp && (Date.now() - parsed.timestamp) < 604800000) {
1628
+ // TTL: 7 days = 604800000 ms; also invalidate if missing bravaisUserId (old cache)
1629
+ if (parsed.timestamp && (Date.now() - parsed.timestamp) < 604800000 && parsed.bravaisUserId) {
1630
1630
  log('Employee data from localStorage cache');
1631
1631
  employeeLookupData = parsed;
1632
1632
  employeeLookupFetched = true;