Dangerous business
This commit is contained in:
@@ -54,8 +54,9 @@ export class EverythingRegistry {
|
||||
return this.#id_to_value.get(registry)?.[id] as T;
|
||||
}
|
||||
|
||||
// empty for a registry nothing has been added to, like blocks in a game whose mods have none
|
||||
static get_registry<T>(registry: string): T[] {
|
||||
return this.#id_to_value.get(registry) as T[];
|
||||
return (this.#id_to_value.get(registry) ?? []) as T[];
|
||||
}
|
||||
|
||||
// forget everything, for tests that load mods more than once
|
||||
|
||||
Reference in New Issue
Block a user