Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib/engine/NgxModelPageDirective.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,15 @@
const getRepository = async (
modelName: string,
acc: KeyValue = {},
parent: string = '',

Check warning on line 316 in src/lib/engine/NgxModelPageDirective.ts

View workflow job for this annotation

GitHub Actions / coverage (22)

'parent' is assigned a value but never used
): Promise<DecafRepository<Model> | void> => {
if (this._repository) return this._repository as DecafRepository<Model>;
const constructor = Model.get(modelName);
if (constructor) {
const properties = this.getModelProperties(constructor);
for (const prop of properties) {
const type = this.getModelPropertyType(constructor as Constructor<Model>, prop);
const context = getModelAndRepository(type as string);
const type = this.getModelPropertyType(constructor, prop);
const context = getModelAndRepository(type) || getModelAndRepository(prop);
if (!context) {
acc[prop] = {};
return getRepository(type, acc, prop);
Expand Down Expand Up @@ -376,7 +376,7 @@
async process<M extends Model>(
event: ICrudFormEvent,
model?: M,
submit: boolean = false,

Check warning on line 379 in src/lib/engine/NgxModelPageDirective.ts

View workflow job for this annotation

GitHub Actions / coverage (22)

'submit' is assigned a value but never used
): Promise<ILayoutModelContext | IModelComponentSubmitEvent<M>> {
const result = { models: {} } as ILayoutModelContext;
const iterate = async (evt: ICrudFormEvent, model: string | M, parent?: string) => {
Expand Down
Loading