pacc 8.1.4 → 8.1.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pacc",
3
- "version": "8.1.4",
3
+ "version": "8.1.5",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
package/src/ast.mjs CHANGED
@@ -99,11 +99,9 @@ export function pathEval(node, current, context) {
99
99
  if (collection) {
100
100
  current = current.map(x => x[item]);
101
101
  } else {
102
- if (current instanceof Map) {
103
- current = current.get(item);
104
- } else {
105
- current = current[item] ?? context.getGlobal(item);
106
- }
102
+ current =
103
+ (current instanceof Map ? current.get(item) : current[item]) ??
104
+ context.getGlobal(item);
107
105
  }
108
106
  }
109
107
  break;
@@ -135,12 +135,6 @@ export function parse(input, context = {}) {
135
135
  }
136
136
  }
137
137
  if (last === DOT) {
138
- switch (typeof left) {
139
- case "number":
140
- right.path.unshift(left);
141
- return right;
142
- }
143
-
144
138
  if (left.path) {
145
139
  left.path.push(...right.path);
146
140
  return left;