@abaplint/runtime 2.4.0 → 2.4.2
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.
|
@@ -19,13 +19,12 @@ async function cast(target, source) {
|
|
|
19
19
|
if (target instanceof types_1.FieldSymbol && target.getPointer() === undefined) {
|
|
20
20
|
throw "GETWA_NOT_ASSIGNED";
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
let targetName = undefined;
|
|
23
|
+
if (target.getQualifiedName) {
|
|
24
|
+
targetName = (_a = target.getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toUpperCase();
|
|
25
|
+
}
|
|
23
26
|
// @ts-ignore
|
|
24
27
|
const targetClass = abap.Classes[targetName];
|
|
25
|
-
/*
|
|
26
|
-
if (targetName?.startsWith("IF_") === false
|
|
27
|
-
&& targetName?.startsWith("ZIF_") === false) { // todo, interfaces are also classes but not inherited
|
|
28
|
-
*/
|
|
29
28
|
if ((targetClass === null || targetClass === void 0 ? void 0 : targetClass.INTERNAL_TYPE) === "CLAS") {
|
|
30
29
|
// using "instanceof" is probably wrong in some cases,
|
|
31
30
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof
|
|
@@ -87,7 +87,12 @@ function insertInternal(options) {
|
|
|
87
87
|
abap.builtin.sy.get().subrc.set(0);
|
|
88
88
|
if (isSorted) {
|
|
89
89
|
// slow, but works for now
|
|
90
|
-
|
|
90
|
+
let by = (_e = (_d = tableOptions === null || tableOptions === void 0 ? void 0 : tableOptions.primaryKey) === null || _d === void 0 ? void 0 : _d.keyFields) === null || _e === void 0 ? void 0 : _e.map(f => {
|
|
91
|
+
return { component: f.toLowerCase() };
|
|
92
|
+
});
|
|
93
|
+
if ((by === null || by === void 0 ? void 0 : by.length) === 1 && by[0].component === "table_line") {
|
|
94
|
+
by = [];
|
|
95
|
+
}
|
|
91
96
|
if (by && by.length > 0) {
|
|
92
97
|
(0, sort_1.sort)(options.table, { by: by });
|
|
93
98
|
}
|