@player-ui/async-node-plugin 0.13.0-next.3 → 0.13.0-next.5

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.
@@ -8186,8 +8186,12 @@ var AsyncNodePlugin = function() {
8186
8186
  if (resolvedNode !== void 0) {
8187
8187
  return resolvedNode;
8188
8188
  }
8189
+ if (context.inProgressNodes.has(node.id)) {
8190
+ return node;
8191
+ }
8192
+ context.inProgressNodes.add(node.id);
8189
8193
  (0, import_queue_microtask3.default)(function() {
8190
- return _this.runAsyncNode(node, context, options);
8194
+ _this.runAsyncNode(node, context, options).finally();
8191
8195
  });
8192
8196
  return node;
8193
8197
  });
@@ -8216,6 +8220,7 @@ var AsyncNodePlugin = function() {
8216
8220
  ];
8217
8221
  case 1:
8218
8222
  result = _state.sent();
8223
+ context.inProgressNodes.delete(node.id);
8219
8224
  _this.parseNodeAndUpdate(node, context, result, options);
8220
8225
  return [
8221
8226
  3,
@@ -8236,6 +8241,7 @@ var AsyncNodePlugin = function() {
8236
8241
  ];
8237
8242
  }
8238
8243
  (_options_logger = options.logger) === null || _options_logger === void 0 ? void 0 : _options_logger.error("Async node handling failed and resolved with a fallback. Error:", error);
8244
+ context.inProgressNodes.delete(node.id);
8239
8245
  _this.parseNodeAndUpdate(node, context, result1, options);
8240
8246
  return [
8241
8247
  3,
@@ -8299,6 +8305,7 @@ var AsyncNodePlugin = function() {
8299
8305
  var _this = this;
8300
8306
  var context = {
8301
8307
  nodeResolveCache: /* @__PURE__ */ new Map(),
8308
+ inProgressNodes: /* @__PURE__ */ new Set(),
8302
8309
  view: view
8303
8310
  };
8304
8311
  view.hooks.parser.tap("async", this.applyParser.bind(this));