bruce-models 0.4.4 → 0.4.6

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.
@@ -1570,8 +1570,16 @@ var Calculator;
1570
1570
  value = BruceVariable.SwapValues(value, entity);
1571
1571
  return eval(value);
1572
1572
  }
1573
- catch (e) {
1574
- console.error(e);
1573
+ catch (exception) {
1574
+ var e = exception;
1575
+ var suppress = false;
1576
+ if (e && typeof e == "object") {
1577
+ var msg = e.message;
1578
+ suppress = !!msg && msg.includes("Unexpected end");
1579
+ }
1580
+ if (!suppress) {
1581
+ console.error(e);
1582
+ }
1575
1583
  }
1576
1584
  }
1577
1585
  return value;
@@ -3194,7 +3202,7 @@ var EntityType;
3194
3202
  if (!data.Name) {
3195
3203
  data.Name = data.ID;
3196
3204
  }
3197
- return [4 /*yield*/, api.POST("entitytype", data, Api.PrepReqParams())];
3205
+ return [4 /*yield*/, api.POST("entitytype/" + data.ID, data, Api.PrepReqParams())];
3198
3206
  case 1:
3199
3207
  data = _a.sent();
3200
3208
  api.Cache.Remove(GetCacheKey(data.ID));