@abaplint/runtime 2.10.42 → 2.10.44

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.
@@ -18,7 +18,13 @@ class Numc {
18
18
  this.value = Math.trunc(value) + "";
19
19
  }
20
20
  else if (typeof value === "string") {
21
- this.value = parseInt(value, 10) + "";
21
+ value = value.trim().replace(/[a-zA-Z]/g, "");
22
+ if (value === "") {
23
+ this.clear();
24
+ }
25
+ else {
26
+ this.value = parseInt(value, 10) + "";
27
+ }
22
28
  }
23
29
  else if (value instanceof float_1.Float) {
24
30
  this.value = Math.trunc(value.getRaw()) + "";
@@ -359,7 +359,7 @@ class Table {
359
359
  }
360
360
  else {
361
361
  if (!(tab instanceof Table) && !(tab instanceof field_symbol_1.FieldSymbol)) {
362
- throw "Table, set error";
362
+ throw new Error("Table, set error");
363
363
  }
364
364
  if (tab instanceof field_symbol_1.FieldSymbol) {
365
365
  tab = tab.getPointer();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.10.42",
3
+ "version": "2.10.44",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",