Skip to content

Commit 3b498d1

Browse files
authored
fix: Allow reregistering fields. (#9290)
1 parent dd05c8d commit 3b498d1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/field_registry.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ export interface RegistrableField {
5656
* @param type The field type name as used in the JSON definition.
5757
* @param fieldClass The field class containing a fromJson function that can
5858
* construct an instance of the field.
59-
* @throws {Error} if the type name is empty, the field is already registered,
60-
* or the fieldClass is not an object containing a fromJson function.
59+
* @throws {Error} if the type name is empty or the fieldClass is not an object
60+
* containing a fromJson function.
6161
*/
6262
export function register(type: string, fieldClass: RegistrableField) {
63-
registry.register(registry.Type.FIELD, type, fieldClass);
63+
registry.register(registry.Type.FIELD, type, fieldClass, true);
6464
}
6565

6666
/**

0 commit comments

Comments
 (0)