Skip to content

Commit 7844e73

Browse files
committed
fix: fixes #22
1 parent 6141493 commit 7844e73

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

projects/ngx-json-schema-form/src/lib/core/services/widget-library.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ import { AbstractWidget } from '../widget/widget';
66
const widgets: Map<string, typeof AbstractWidget> = new Map<string, typeof AbstractWidget>();
77

88
/** Internal method for registering a widget with the widget library */
9-
export const register = (component: typeof AbstractWidget, types: Array<string>): void => {
9+
export function register(component: typeof AbstractWidget, types: Array<string>): void {
1010
types.forEach((type: string) => {
1111
if (widgets.has(type)) {
1212
console.error(`Widget type "${type}" already exists. Ignoring.`, component);
1313
} else {
1414
widgets.set(type, component);
1515
}
1616
});
17-
};
17+
}
1818

1919
/**
2020
* Provides services for mapping a widget component to a layoutNode type

projects/ngx-json-schema-form/src/lib/form/form.module.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import { JsonSchemaFormComponent } from './json-schema-form.component';
77
@NgModule({
88
declarations: [ JsonSchemaFormComponent ],
99
exports: [ JsonSchemaFormComponent ],
10-
imports: [
11-
CommonModule, SelectWidgetModule
12-
]
10+
imports: [ CommonModule, SelectWidgetModule ]
1311
})
1412
export class FormModule { }

0 commit comments

Comments
 (0)