@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.
@@ -1999,9 +1999,9 @@ function gobj_change_state(gobj, state_name) {
1999
1999
  *
2000
2000
  ***************************************************************************/
2001
2001
  function gobj_current_state(gobj) {
2002
- if (gobj_is_destroying(gobj)) {
2003
- log_error("gobj NULL or DESTROYED");
2004
- return null;
2002
+ if (!is_gobj(gobj)) {
2003
+ log_error("hgobj NULL");
2004
+ return "";
2005
2005
  }
2006
2006
  return gobj.current_state.state_name;
2007
2007
  }
@@ -5615,6 +5615,7 @@ function setup_websocket(gobj) {
5615
5615
  }, gobj);
5616
5616
  };
5617
5617
  websocket.onclose = (e) => {
5618
+ if (gobj_is_destroying(gobj)) return;
5618
5619
  if (!gobj_read_bool_attr(gobj_yuno(), "browser_beforeunload")) gobj_send_event(gobj, "EV_ON_CLOSE", {
5619
5620
  url,
5620
5621
  e