@abaplint/runtime 2.6.22 → 2.6.23

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.
@@ -11,15 +11,13 @@ function assign(input) {
11
11
  }
12
12
  input.dynamicName = input.dynamicName.trimEnd();
13
13
  if (input.dynamicName.includes("->")) {
14
- if (input.dynamicSource instanceof types_1.ABAPObject) {
15
- const split = input.dynamicName.split("->");
16
- // @ts-ignore
17
- input.dynamicSource = input.dynamicSource.get()[split[1].toLowerCase()];
18
- }
19
- else if (input.dynamicSource instanceof types_1.DataReference) {
20
- const [_before, after] = input.dynamicName.split("->");
21
- // @ts-ignore
22
- input.dynamicSource = input.dynamicSource.get()[after.toLowerCase()];
14
+ if (input.dynamicSource instanceof types_1.ABAPObject || input.dynamicSource instanceof types_1.DataReference) {
15
+ const split = input.dynamicName.split(/->|-/);
16
+ split.shift();
17
+ for (const s of split) {
18
+ // @ts-ignore
19
+ input.dynamicSource = input.dynamicSource.get()[s.toLowerCase()];
20
+ }
23
21
  }
24
22
  else {
25
23
  // @ts-ignore
@@ -96,7 +94,11 @@ function assign(input) {
96
94
  }
97
95
  }
98
96
  else if (!(input.source instanceof types_1.Table)) {
99
- result = input.source.get()[component.toLowerCase().trimEnd()];
97
+ const split = component.toLowerCase().trimEnd().split("-");
98
+ result = input.source;
99
+ for (const s of split) {
100
+ result = result.get()[s];
101
+ }
100
102
  }
101
103
  if (result === undefined) {
102
104
  // not a field in the structure
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.6.22",
3
+ "version": "2.6.23",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",