rado 0.3.6 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -384,7 +384,13 @@ class Expr {
384
384
  return this;
385
385
  }
386
386
  get(name) {
387
- return new Expr(new ExprData.Field(this[Expr.Data], name));
387
+ switch (this[Expr.Data].type) {
388
+ case "ExprData.Record" /* Record */:
389
+ if (name in this[Expr.Data].fields)
390
+ return new Expr(this[Expr.Data].fields[name]);
391
+ default:
392
+ return new Expr(new ExprData.Field(this[Expr.Data], name));
393
+ }
388
394
  }
389
395
  static [Symbol.hasInstance](instance) {
390
396
  return instance?.[Expr.IsExpr];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rado",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",