mol_wire_lib 1.0.197 → 1.0.198

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/node.test.js CHANGED
@@ -2400,7 +2400,7 @@ var $;
2400
2400
  function $mol_jsx(Elem, props, ...childNodes) {
2401
2401
  const id = props && props.id || '';
2402
2402
  const guid = id ? $.$mol_jsx_prefix ? $.$mol_jsx_prefix + '/' + id : id : $.$mol_jsx_prefix;
2403
- const crumbs_self = id ? $.$mol_jsx_crumbs.replace(/(\S+)/g, `$1_${id}`) : $.$mol_jsx_crumbs;
2403
+ const crumbs_self = id ? $.$mol_jsx_crumbs.replace(/(\S+)/g, `$1_${id.replace(/\/.*/i, '')}`) : $.$mol_jsx_crumbs;
2404
2404
  if (Elem && $.$mol_jsx_booked) {
2405
2405
  if ($.$mol_jsx_booked.has(id)) {
2406
2406
  $mol_fail(new Error(`JSX already has tag with id ${JSON.stringify(guid)}`));
@@ -2476,7 +2476,11 @@ var $;
2476
2476
  $mol_dom_render_children(node, [].concat(...childNodes));
2477
2477
  if (!Elem)
2478
2478
  return node;
2479
+ if (guid)
2480
+ node.id = guid;
2479
2481
  for (const key in props) {
2482
+ if (key === 'id')
2483
+ continue;
2480
2484
  if (typeof props[key] === 'string') {
2481
2485
  ;
2482
2486
  node.setAttribute(key, props[key]);
@@ -2493,8 +2497,6 @@ var $;
2493
2497
  node[key] = props[key];
2494
2498
  }
2495
2499
  }
2496
- if (guid)
2497
- node.id = guid;
2498
2500
  if ($.$mol_jsx_crumbs)
2499
2501
  node.className = (props?.['class'] ? props['class'] + ' ' : '') + crumbs_self;
2500
2502
  return node;