Storybook: Explicitly set init on a registry to stop Storybook from being broken (#55909)

This commit is contained in:
Joao Silva 2022-09-28 13:29:41 +01:00 committed by GitHub
parent 2472777ce2
commit cf1862ecc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,9 @@ export class Registry<T extends RegistryItem> {
private byId = new Map<string, T>();
private initialized = false;
constructor(private init?: () => T[]) {}
constructor(private init?: () => T[]) {
this.init = init;
}
setInit = (init: () => T[]) => {
if (this.initialized) {