@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.
@@ -801,7 +801,7 @@ function Ze(e, t) {
801
801
  return n ? (e.last_state = e.current_state, e.current_state = n, !0) : (St(`${Oe(e)}: state unknown, state ${t}`), !1);
802
802
  }
803
803
  function et(e) {
804
- return Re(e) ? (St("gobj NULL or DESTROYED"), null) : e.current_state.state_name;
804
+ return Ht(e) ? e.current_state.state_name : (St("hgobj NULL"), "");
805
805
  }
806
806
  function tt(e, t, n) {
807
807
  if (!Ht(e)) return St("gobj NULL of bad type"), null;
@@ -1811,10 +1811,10 @@ function cr(e) {
1811
1811
  data: n.data
1812
1812
  }, e);
1813
1813
  }, n.onclose = (n) => {
1814
- Ye(Ee(), "browser_beforeunload") ? Ot("Close websocket by unload page") : ot(e, "EV_ON_CLOSE", {
1814
+ Re(e) || (Ye(Ee(), "browser_beforeunload") ? Ot("Close websocket by unload page") : ot(e, "EV_ON_CLOSE", {
1815
1815
  url: t,
1816
1816
  e: n
1817
- }, e);
1817
+ }, e));
1818
1818
  }, n) : (St(`${Oe(e)}: Failed to initialize WebSocket.`), null);
1819
1819
  }
1820
1820
  function fr(e, t = 1e3, n = "") {