Skip to content

Commit

Permalink
fix(meta): fixing scenario where property name may conflict with a to… (
Browse files Browse the repository at this point in the history
#50)

* fix(meta): fixing scenario where property name may conflict with a top level entity field
  • Loading branch information
hiqbal01 authored Mar 9, 2020
1 parent a2b5814 commit b7d37be
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/services/MetaService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ export class MetaService {
return this.memory[field.name];
},
set(value) {
this.memory[field.name] = value;
if (typeof value !== 'string') {
this.memory[field.name] = value;
}
},
configurable: true,
enumerable: true,
Expand All @@ -193,7 +195,9 @@ export class MetaService {
if (!exists) {
this.fields.push(field);
}
this.memory[field.name] = field;
if (typeof field !== 'string') {
this.memory[field.name] = field;
}
}
this.fields.sort((a, b) => {
const aa = a.sortOrder ? a.sortOrder : a.name;
Expand Down

0 comments on commit b7d37be

Please sign in to comment.