@yuneta/gobj-js 7.3.3 → 7.6.5

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.
@@ -1766,8 +1766,12 @@
1766
1766
  const it = sdata_desc[i];
1767
1767
  if (!it.name) continue;
1768
1768
  if (include_flag === -1 || it.flag & include_flag) {
1769
- let jn = json_object_get(gobj.jn_attrs, it.name);
1770
- json_object_set(jn_attrs, it.name, jn);
1769
+ let value;
1770
+ if (gobj.gclass.gmt.mt_reading && !(gobj.obflag & obflag_t.obflag_destroyed)) {
1771
+ value = gobj.gclass.gmt.mt_reading(gobj, it.name);
1772
+ if (value === void 0) value = json_object_get(gobj.jn_attrs, it.name);
1773
+ } else value = json_object_get(gobj.jn_attrs, it.name);
1774
+ json_object_set(jn_attrs, it.name, value);
1771
1775
  }
1772
1776
  }
1773
1777
  return jn_attrs;