mol_plot_all 1.2.259 → 1.2.260

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
@@ -6151,7 +6151,7 @@ var $;
6151
6151
  function $mol_jsx(Elem, props, ...childNodes) {
6152
6152
  const id = props && props.id || '';
6153
6153
  const guid = id ? $.$mol_jsx_prefix ? $.$mol_jsx_prefix + '/' + id : id : $.$mol_jsx_prefix;
6154
- const crumbs_self = id ? $.$mol_jsx_crumbs.replace(/(\S+)/g, `$1_${id}`) : $.$mol_jsx_crumbs;
6154
+ const crumbs_self = id ? $.$mol_jsx_crumbs.replace(/(\S+)/g, `$1_${id.replace(/\/.*/i, '')}`) : $.$mol_jsx_crumbs;
6155
6155
  if (Elem && $.$mol_jsx_booked) {
6156
6156
  if ($.$mol_jsx_booked.has(id)) {
6157
6157
  $mol_fail(new Error(`JSX already has tag with id ${JSON.stringify(guid)}`));
@@ -6227,7 +6227,11 @@ var $;
6227
6227
  $mol_dom_render_children(node, [].concat(...childNodes));
6228
6228
  if (!Elem)
6229
6229
  return node;
6230
+ if (guid)
6231
+ node.id = guid;
6230
6232
  for (const key in props) {
6233
+ if (key === 'id')
6234
+ continue;
6231
6235
  if (typeof props[key] === 'string') {
6232
6236
  ;
6233
6237
  node.setAttribute(key, props[key]);
@@ -6244,8 +6248,6 @@ var $;
6244
6248
  node[key] = props[key];
6245
6249
  }
6246
6250
  }
6247
- if (guid)
6248
- node.id = guid;
6249
6251
  if ($.$mol_jsx_crumbs)
6250
6252
  node.className = (props?.['class'] ? props['class'] + ' ' : '') + crumbs_self;
6251
6253
  return node;