@yuneta/gobj-js 7.6.5 → 7.6.7

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.
@@ -917,7 +917,7 @@ function Dt(e, t) {
917
917
  return n ? (e.last_state = e.current_state, e.current_state = n, !0) : (ln(`${Qe(e)}: state unknown, state ${t}`), !1);
918
918
  }
919
919
  function Rt(e) {
920
- return Ze(e) ? (ln("gobj NULL or DESTROYED"), null) : e.current_state.state_name;
920
+ return Cn(e) ? e.current_state.state_name : (ln("hgobj NULL"), "");
921
921
  }
922
922
  function jt(e, n) {
923
923
  return Ze(e) ? (ln("gobj NULL or DESTROYED"), null) : n instanceof k ? (e.parent && e.parent.mt_child_removed && e.parent.mt_child_removed(e.parent, e), e.parent && (fe(e.parent, e), e.parent = null), ce(n, e), n.mt_child_added && (E && mt(E, "trace_creation") && an(t("👦👦🔵 child_added(%s): %s", qe(n), Qe(e))), n.mt_child_added(n, e)), 0) : (ln(`${Qe(e)}: gobj_change_parent() BAD TYPE of parent`), -1);
@@ -2469,10 +2469,10 @@ function Ml(e) {
2469
2469
  data: n.data
2470
2470
  }, e);
2471
2471
  }, n.onclose = (n) => {
2472
- mt(Me(), "browser_beforeunload") ? on("Close websocket by unload page") : Lt(e, "EV_ON_CLOSE", {
2472
+ Ze(e) || (mt(Me(), "browser_beforeunload") ? on("Close websocket by unload page") : Lt(e, "EV_ON_CLOSE", {
2473
2473
  url: t,
2474
2474
  e: n
2475
- }, e);
2475
+ }, e));
2476
2476
  }, n) : (ln(`${Qe(e)}: Failed to initialize WebSocket.`), null);
2477
2477
  }
2478
2478
  function Kl(e, t = 1e3, n = "") {