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