Skip to content

Commit 07f44ec

Browse files
committed
Move ready signal for all loaded.
1 parent b8655c5 commit 07f44ec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dash/dash-renderer/src/libraries/librariesContext.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ export function createLibrariesContext(
9595
if (loaded.length) {
9696
dispatch(setLibraryLoaded({libraries: loaded}));
9797
}
98+
if (loaded.length === initialLibraries.length) {
99+
onReady();
100+
}
98101
});
99102
}, [initialLibraries]);
100103

@@ -105,9 +108,6 @@ export function createLibrariesContext(
105108
}
106109
const libraries = getLibrariesToLoad();
107110
if (!libraries.length) {
108-
if (!ready && initialLibraries) {
109-
onReady();
110-
}
111111
return;
112112
}
113113
if (callback > 0) {

0 commit comments

Comments
 (0)