Changed Knockout a bit

This commit is contained in:
the-djmaze 2024-02-03 12:06:56 +01:00
parent a352ebff25
commit f105ed3f9d
15 changed files with 205 additions and 194 deletions

View file

@ -10,11 +10,11 @@
// Join the loading process that is already underway, or start a new one.
var subscribable = loadingSubscribablesCache[componentName];
if (subscribable) {
subscribable.subscribe(callback);
subscribable['subscribe'](callback);
} else {
// It's not started loading yet. Start loading, and when it's done, move it to loadedDefinitionsCache.
subscribable = loadingSubscribablesCache[componentName] = new ko.subscribable();
subscribable.subscribe(callback);
subscribable['subscribe'](callback);
loadComponent(componentName, definition => {
loadedDefinitionsCache.set(componentName, definition);