@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.
@@ -804,7 +804,7 @@
804
804
  return n ? (e.last_state = e.current_state, e.current_state = n, !0) : (Ot(`${Ne(e)}: state unknown, state ${t}`), !1);
805
805
  }
806
806
  function tt(e) {
807
- return $e(e) ? (Ot("gobj NULL or DESTROYED"), null) : e.current_state.state_name;
807
+ return Xt(e) ? e.current_state.state_name : (Ot("hgobj NULL"), "");
808
808
  }
809
809
  function nt(e, t, n) {
810
810
  if (!Xt(e)) return Ot("gobj NULL of bad type"), null;
@@ -1814,10 +1814,10 @@
1814
1814
  data: n.data
1815
1815
  }, e);
1816
1816
  }, n.onclose = (n) => {
1817
- Be(Te(), "browser_beforeunload") ? Nt("Close websocket by unload page") : ot(e, "EV_ON_CLOSE", {
1817
+ $e(e) || (Be(Te(), "browser_beforeunload") ? Nt("Close websocket by unload page") : ot(e, "EV_ON_CLOSE", {
1818
1818
  url: t,
1819
1819
  e: n
1820
- }, e);
1820
+ }, e));
1821
1821
  }, n) : (Ot(`${Ne(e)}: Failed to initialize WebSocket.`), null);
1822
1822
  }
1823
1823
  function gr(e, t = 1e3, n = "") {