@yuneta/gobj-js 7.13.3 → 7.13.4

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.
@@ -1580,7 +1580,7 @@ function gobj_play(gobj) {
1580
1580
  let ret = 0;
1581
1581
  if (gobj.gclass.gmt.mt_play) {
1582
1582
  ret = gobj.gclass.gmt.mt_play(gobj);
1583
- if (ret < 0) gobj.playing = false;
1583
+ if (ret < 0 || ret === false) gobj.playing = false;
1584
1584
  }
1585
1585
  return ret;
1586
1586
  }
@@ -2714,7 +2714,8 @@ function gobj_subscribe_event(publisher, event, kw, subscriber) {
2714
2714
  if (kw) trace_json(kw);
2715
2715
  }
2716
2716
  if (publisher.gclass.gmt.mt_subscription_added) {
2717
- if (publisher.gclass.gmt.mt_subscription_added(publisher, subs) < 0) {
2717
+ let result = publisher.gclass.gmt.mt_subscription_added(publisher, subs);
2718
+ if (result < 0 || result === false) {
2718
2719
  _delete_subscription(publisher, subs, true, true);
2719
2720
  subs = 0;
2720
2721
  }
@@ -2863,7 +2864,7 @@ function gobj_publish_event(publisher, event, kw) {
2863
2864
  if (publisher.gclass.gmt.mt_publication_pre_filter) {
2864
2865
  let topublish = publisher.gclass.gmt.mt_publication_pre_filter(publisher, subs, event, kw);
2865
2866
  if (topublish < 0) break;
2866
- else if (topublish === 0) continue;
2867
+ else if (!topublish) continue;
2867
2868
  }
2868
2869
  let subscriber = kw_get_pointer(publisher, subs, "subscriber", null, kw_flag_t.KW_REQUIRED);
2869
2870
  if (!(subscriber && !gobj_is_destroying(subscriber))) continue;