@abaplint/runtime 2.7.121 → 2.7.123

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.
@@ -77,7 +77,7 @@ export declare class HashedTable implements ITable {
77
77
  getOptions(): ITableOptions;
78
78
  getRowType(): TableRowType;
79
79
  clear(): void;
80
- set(tab: TableRowType): ITable;
80
+ set(tab: HashedTable | TableRowType): ITable;
81
81
  getHeader(): TableRowType;
82
82
  private getValue;
83
83
  }
@@ -209,6 +209,9 @@ class HashedTable {
209
209
  }
210
210
  return this.set(tab.getPointer());
211
211
  }
212
+ if (tab === this) {
213
+ return this;
214
+ }
212
215
  this.clear();
213
216
  if (tab instanceof Table || tab instanceof HashedTable) {
214
217
  for (const a of tab.array()) {
@@ -322,10 +325,13 @@ class Table {
322
325
  if (!(tab instanceof Table) && !(tab instanceof field_symbol_1.FieldSymbol)) {
323
326
  throw "Table, set error";
324
327
  }
325
- this.clear();
326
328
  if (tab instanceof field_symbol_1.FieldSymbol) {
327
329
  tab = tab.getPointer();
328
330
  }
331
+ if (tab === this) {
332
+ return this;
333
+ }
334
+ this.clear();
329
335
  // this clones the values, and add sorting if required
330
336
  (0, insert_internal_1.insertInternal)({ table: this, data: tab, lines: true });
331
337
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.7.121",
3
+ "version": "2.7.123",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",