mol_time_all 1.1.1016 → 1.1.1018

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
@@ -2989,6 +2989,9 @@ var $;
2989
2989
  if (typeof json === 'string') {
2990
2990
  return $mol_tree2.data(json, [], span);
2991
2991
  }
2992
+ if (typeof json.toJSON === 'function') {
2993
+ return $mol_tree2_from_json(json.toJSON());
2994
+ }
2992
2995
  if (Array.isArray(json)) {
2993
2996
  const sub = json.map(json => $mol_tree2_from_json(json, span));
2994
2997
  return new $mol_tree2('/', '', sub, span);
@@ -3000,9 +3003,6 @@ var $;
3000
3003
  if (json instanceof Date) {
3001
3004
  return new $mol_tree2('', json.toISOString(), [], span);
3002
3005
  }
3003
- if (typeof json.toJSON === 'function') {
3004
- return $mol_tree2_from_json(json.toJSON());
3005
- }
3006
3006
  if (json.toString !== Object.prototype.toString) {
3007
3007
  return $mol_tree2.data(json.toString(), [], span);
3008
3008
  }