From 3b498d1384baba09e3787b1ce92bb1364d121304 Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Fri, 22 Aug 2025 14:55:07 -0700 Subject: [PATCH] fix: Allow reregistering fields. (#9290) --- core/field_registry.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/field_registry.ts b/core/field_registry.ts index 06bb9acd0..e02ece75c 100644 --- a/core/field_registry.ts +++ b/core/field_registry.ts @@ -56,11 +56,11 @@ export interface RegistrableField { * @param type The field type name as used in the JSON definition. * @param fieldClass The field class containing a fromJson function that can * construct an instance of the field. - * @throws {Error} if the type name is empty, the field is already registered, - * or the fieldClass is not an object containing a fromJson function. + * @throws {Error} if the type name is empty or the fieldClass is not an object + * containing a fromJson function. */ export function register(type: string, fieldClass: RegistrableField) { - registry.register(registry.Type.FIELD, type, fieldClass); + registry.register(registry.Type.FIELD, type, fieldClass, true); } /**