Skip to content

Commit 785c03c

Browse files
author
William Duncan
committed
undefined assertions in for..in loop
1 parent 1b5f372 commit 785c03c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gen/util.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ function addExtraReturnsToOperation(operation: Schema.Operation): Schema.Operati
8585
*/
8686
export function replaceModelTypes(schema: Schema, config: Config): Schema {
8787
for (const modelID in schema.models) {
88-
const model = schema.models[modelID];
88+
const model = schema.models[modelID]!;
8989
for (const fieldID in model.fields) {
90-
const field = model.fields[fieldID];
90+
const field = model.fields[fieldID]!;
9191
if (schema.models.find(m => m.name === field.type))
92-
schema.models[modelID].fields[fieldID].type = `${config.name}.${field.type}`;
92+
schema.models[modelID]!.fields[fieldID]!.type = `${config.name}.${field.type}`;
9393
}
9494
}
9595
return schema;

0 commit comments

Comments
 (0)