Skip to content

Commit

Permalink
Remove the save call on web
Browse files Browse the repository at this point in the history
This removes the save call on web to prevent any unwanted called to
`getApplicationDocumentsDirectory` which doesnt exist.
  • Loading branch information
anthonycastelli committed Apr 22, 2024
1 parent d82540f commit e6dc68a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/caching/event_cache.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ class EventCache {
/// This will remove all of the local cached events.
void clear() async {
_cache.clear();
await _save();

if (!kIsWeb) {
await _save();
}
}

Future<Map<String, AppFitEvent>> _read() async {
Expand Down

0 comments on commit e6dc68a

Please sign in to comment.