Fix infinitely recursive grammars

This commit is contained in:
barsdeveloper
2024-03-23 01:08:13 +01:00
parent a57fa97cff
commit 5973570911
4 changed files with 5 additions and 5 deletions

View File

@@ -201,7 +201,7 @@ export default class ObjectEntity extends IEntity {
static grammar = this.createGrammar()
static createSubObjectGrammar() {
return Parsernostrum.lazy(() => this.createGrammar())
return Parsernostrum.lazy(() => this.grammar)
.map(object =>
values => values[Configuration.subObjectAttributeNameFromEntity(object)] = object
)