Use addCallbackAndRunD

This commit is contained in:
Pieter Vander Vennet 2021-06-30 16:02:46 +02:00
parent 8d9a992507
commit ba04beab2c
4 changed files with 5 additions and 12 deletions

View file

@ -11,8 +11,6 @@ export default class LocalStorageSource implements FeatureSource {
this.features = new UIEventSource<{ feature: any; freshness: Date }[]>([])
const key = LocalStorageSaver.storageKey + layout.data.id
layout.addCallbackAndRun(_ => {
try {
const fromStorage = localStorage.getItem(key);
if (fromStorage == null) {