Skip to content

Commit 5ebd776

Browse files
committed
minor
1 parent d16b1f0 commit 5ebd776

File tree

1 file changed

+5
-4
lines changed
  • services/static-webserver/client/source/class/osparc/store

1 file changed

+5
-4
lines changed

services/static-webserver/client/source/class/osparc/store/Services.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,16 @@ qx.Class.define("osparc.store.Services", {
133133
this.__addServiceToCache(service);
134134
// Resolve the promise locally before deleting it
135135
resolve(service);
136-
// Remove the promise from the cache
137-
delete this.__servicesPromisesCached[key][version];
138136
})
139137
.catch(err => {
140-
// store it in cache to avoid asking again
138+
// Store null in cache to avoid repeated failed requests
141139
this.__addToCache(key, version, null);
142-
delete this.__servicesPromisesCached[key][version];
143140
console.error(err);
144141
reject(err);
142+
})
143+
.finally(() => {
144+
// Remove the promise from the cache
145+
delete this.__servicesPromisesCached[key][version];
145146
});
146147
});
147148
},

0 commit comments

Comments
 (0)