Skip to content

Commit

Permalink
Set update time when cache is updated (#94)
Browse files Browse the repository at this point in the history
* Set update time if no updates or cache updated

* update only when cache changes
  • Loading branch information
tore-statsig authored Sep 8, 2021
1 parent 45f0279 commit 116780f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SpecStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ const SpecStore = {

// returns a boolean indicating whether specsJSON has was successfully parsed
_process(specsJSON) {
this.time = specsJSON.time ?? this.time;
if (!specsJSON?.has_updates) {
return false;
}
Expand Down Expand Up @@ -104,6 +103,7 @@ const SpecStore = {
if (!parseFailed) {
this.store.gates = updatedGates;
this.store.configs = updatedConfigs;
this.time = specsJSON.time ?? this.time;
}

return !parseFailed;
Expand Down

0 comments on commit 116780f

Please sign in to comment.