@meta2d/core 1.0.44 → 1.0.45

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.
package/src/core.js CHANGED
@@ -589,6 +589,17 @@ var Meta2d = /** @class */ (function () {
589
589
  };
590
590
  this.events[EventAction.StopAnimate] = function (pen, e) {
591
591
  if (!e.value || typeof e.value === 'string') {
592
+ if (e.value) {
593
+ var _pen = _this.findOne(e.value);
594
+ if (!_this.store.animates.has(_pen)) {
595
+ return;
596
+ }
597
+ }
598
+ else {
599
+ if (!_this.store.animates.has(pen)) {
600
+ return;
601
+ }
602
+ }
592
603
  _this.stopAnimate(e.value || [pen]);
593
604
  return;
594
605
  }
@@ -2297,17 +2308,21 @@ var Meta2d = /** @class */ (function () {
2297
2308
  if (!req.url) return [3 /*break*/, 3];
2298
2309
  if (typeof req.headers === 'object') {
2299
2310
  for (i in req.headers) {
2300
- keys = req.headers[i].match(/(?<=\$\{).*?(?=\})/g);
2301
- if (keys) {
2302
- req.headers[i] = req.headers[i].replace("${" + keys[0] + "}", this.getDynamicParam(keys[0]));
2311
+ if (typeof req.headers[i] === 'string') {
2312
+ keys = req.headers[i].match(/(?<=\$\{).*?(?=\})/g);
2313
+ if (keys) {
2314
+ req.headers[i] = req.headers[i].replace("${" + keys[0] + "}", this.getDynamicParam(keys[0]));
2315
+ }
2303
2316
  }
2304
2317
  }
2305
2318
  }
2306
2319
  if (typeof req.body === 'object') {
2307
2320
  for (i in req.body) {
2308
- keys = req.body[i].match(/(?<=\$\{).*?(?=\})/g);
2309
- if (keys) {
2310
- req.body[i] = req.body[i].replace("${" + keys[0] + "}", this.getDynamicParam(keys[0]));
2321
+ if (typeof req.body[i] === 'string') {
2322
+ keys = req.body[i].match(/(?<=\$\{).*?(?=\})/g);
2323
+ if (keys) {
2324
+ req.body[i] = req.body[i].replace("${" + keys[0] + "}", this.getDynamicParam(keys[0]));
2325
+ }
2311
2326
  }
2312
2327
  }
2313
2328
  }