@yuneta/gobj-js 7.13.2 → 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.
@@ -1581,7 +1581,7 @@ var gobjJs = (function(exports) {
1581
1581
  let ret = 0;
1582
1582
  if (gobj.gclass.gmt.mt_play) {
1583
1583
  ret = gobj.gclass.gmt.mt_play(gobj);
1584
- if (ret < 0) gobj.playing = false;
1584
+ if (ret < 0 || ret === false) gobj.playing = false;
1585
1585
  }
1586
1586
  return ret;
1587
1587
  }
@@ -2715,7 +2715,8 @@ var gobjJs = (function(exports) {
2715
2715
  if (kw) trace_json(kw);
2716
2716
  }
2717
2717
  if (publisher.gclass.gmt.mt_subscription_added) {
2718
- if (publisher.gclass.gmt.mt_subscription_added(publisher, subs) < 0) {
2718
+ let result = publisher.gclass.gmt.mt_subscription_added(publisher, subs);
2719
+ if (result < 0 || result === false) {
2719
2720
  _delete_subscription(publisher, subs, true, true);
2720
2721
  subs = 0;
2721
2722
  }
@@ -2864,7 +2865,7 @@ var gobjJs = (function(exports) {
2864
2865
  if (publisher.gclass.gmt.mt_publication_pre_filter) {
2865
2866
  let topublish = publisher.gclass.gmt.mt_publication_pre_filter(publisher, subs, event, kw);
2866
2867
  if (topublish < 0) break;
2867
- else if (topublish === 0) continue;
2868
+ else if (!topublish) continue;
2868
2869
  }
2869
2870
  let subscriber = kw_get_pointer(publisher, subs, "subscriber", null, kw_flag_t.KW_REQUIRED);
2870
2871
  if (!(subscriber && !gobj_is_destroying(subscriber))) continue;
@@ -2879,14 +2880,14 @@ var gobjJs = (function(exports) {
2879
2880
  let topublish = 1;
2880
2881
  if (publisher.gclass.gmt.mt_publication_filter) topublish = publisher.gclass.gmt.mt_publication_filter(publisher, event, kw2publish, subscriber);
2881
2882
  else if (json_size(__filter__) > 0) {
2882
- topublish = kw_match_simple(kw2publish, __filter__);
2883
+ topublish = kw_match_simple(kw2publish, __filter__) ? 1 : 0;
2883
2884
  if (tracea) {
2884
2885
  trace_machine(sprintf("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", topublish ? "👍" : "👎", event ? event : "", gobj_short_name(subscriber), gobj_short_name(publisher)));
2885
2886
  trace_json(__filter__);
2886
2887
  }
2887
2888
  }
2888
2889
  if (topublish < 0) break;
2889
- else if (topublish === 0) continue;
2890
+ else if (!topublish) continue;
2890
2891
  let ev_ = gobj_event_type(subscriber, event, true);
2891
2892
  if (ev_) {
2892
2893
  if (ev_.event_flag & event_flag_t.EVF_SYSTEM_EVENT) {