A simple reproducible example showing the bug: .bolt file: `path /test/{x} is String{ validate() { this.parent()[prior(this)] == x } } ` .json file produced: ` { "rules": { "test": { "$x": { ".validate": "(newData.isString() && newData.parent().child(data).val() == $x)" } } } } ` .json file expected: ` { "rules": { "test": { "$x": { ".validate": "(newData.isString() && newData.parent().child(data.val()).val() == $x)" } } } } ` Inside the child function data.val() should be present. When I remove the prior(), the result is newData.val() as expected.
A simple reproducible example showing the bug:
.bolt file:
path /test/{x} is String{ validate() { this.parent()[prior(this)] == x } }.json file produced:
{ "rules": { "test": { "$x": { ".validate": "(newData.isString() && newData.parent().child(data).val() == $x)" } } } }.json file expected:
{ "rules": { "test": { "$x": { ".validate": "(newData.isString() && newData.parent().child(data.val()).val() == $x)" } } } }Inside the child function data.val() should be present.
When I remove the prior(), the result is newData.val() as expected.