mam 1.11.251 → 1.11.252

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
@@ -647,6 +647,9 @@ var $;
647
647
  if (typeof json === 'string') {
648
648
  return $mol_tree2.data(json, [], span);
649
649
  }
650
+ if (typeof json.toJSON === 'function') {
651
+ return $mol_tree2_from_json(json.toJSON());
652
+ }
650
653
  if (Array.isArray(json)) {
651
654
  const sub = json.map(json => $mol_tree2_from_json(json, span));
652
655
  return new $mol_tree2('/', '', sub, span);
@@ -658,9 +661,6 @@ var $;
658
661
  if (json instanceof Date) {
659
662
  return new $mol_tree2('', json.toISOString(), [], span);
660
663
  }
661
- if (typeof json.toJSON === 'function') {
662
- return $mol_tree2_from_json(json.toJSON());
663
- }
664
664
  if (json.toString !== Object.prototype.toString) {
665
665
  return $mol_tree2.data(json.toString(), [], span);
666
666
  }