Unverified Commit ee7f5ae3 authored by Markus Gritsch's avatar Markus Gritsch Committed by GitHub

Add required default value for the ids parameter (#44694)

Before migrating "loadable" the from js to ts, the reload-ready function initialized its "ids" parameter with an empty array. The migration step added the parameter type but removed the initialization.

Providing an empty array as the default value for the ids parameter is necessary; otherwise, the ids variable in the createLoadableComponent function, line 102, gets undefined, and the loading of components fails.

fixes #44695
parent ca5f265a
......@@ -259,7 +259,7 @@ Loadable.preloadAll = () => {
})
}
Loadable.preloadReady = (ids?: (string | number)[]): Promise<void> => {
Loadable.preloadReady = (ids: (string | number)[] = []): Promise<void> => {
return new Promise<void>((resolvePreload) => {
const res = () => {
initialized = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment