mol_jsx_lib 0.0.922 → 0.0.923

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.js CHANGED
@@ -743,6 +743,9 @@ var $;
743
743
  if (typeof json === 'string') {
744
744
  return $mol_tree2.data(json, [], span);
745
745
  }
746
+ if (typeof json.toJSON === 'function') {
747
+ return $mol_tree2_from_json(json.toJSON());
748
+ }
746
749
  if (Array.isArray(json)) {
747
750
  const sub = json.map(json => $mol_tree2_from_json(json, span));
748
751
  return new $mol_tree2('/', '', sub, span);
@@ -754,9 +757,6 @@ var $;
754
757
  if (json instanceof Date) {
755
758
  return new $mol_tree2('', json.toISOString(), [], span);
756
759
  }
757
- if (typeof json.toJSON === 'function') {
758
- return $mol_tree2_from_json(json.toJSON());
759
- }
760
760
  if (json.toString !== Object.prototype.toString) {
761
761
  return $mol_tree2.data(json.toString(), [], span);
762
762
  }