Skip to content

Commit

Permalink
Fix fast instantiator failing to compile when the typename has newlin…
Browse files Browse the repository at this point in the history
…es in it
  • Loading branch information
airhorns committed Apr 25, 2024
1 parent 23a9806 commit ce1c5c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fast-instantiator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class InstantiatorBuilder<T extends IClassModelType<Record<string, IAnyType>, an
private assignmentExpressionForArrayType(key: string, type: ArrayType<any>): string {
if (!isDirectlyAssignableType(type.childrenType) || type.childrenType instanceof DateType) {
return `
// instantiate fallback for ${key} of type ${type.name}
// instantiate fallback for ${key} of type ${type.name.replace("\n", "")}
this["${key}"] = ${this.alias(`model.properties["${key}"]`)}.instantiate(
snapshot?.["${key}"],
context,
Expand Down

0 comments on commit ce1c5c4

Please sign in to comment.