cross-tab-worker-databus 0.21.5 → 0.21.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.
@@ -1188,7 +1188,8 @@ var WorkerClusterRuntime = class {
1188
1188
  if (this.releaseHandoffOnUnsubscribe(message)) return;
1189
1189
  break;
1190
1190
  case CONTROL_ACTION.PUBLISH:
1191
- if (message.items && message.items.length > 0) {
1191
+ if (message.items !== void 0) {
1192
+ if (!Array.isArray(message.items) || message.items.length === 0) return;
1192
1193
  if (this.handlers.onPublishBatch) {
1193
1194
  this.handlers.onPublishBatch(message.topic, message.items);
1194
1195
  return;
@@ -1249,6 +1250,7 @@ var WorkerClusterRuntime = class {
1249
1250
  */
1250
1251
  handleRouteReleasedMessage(message) {
1251
1252
  if (message.targetWorkerId !== this.workerId) return;
1253
+ if (createOpaqueKey(message.topic) !== message.topicKey) return;
1252
1254
  const route = this.readRoute(message.topicKey);
1253
1255
  if (!route || this.isStaleRouteRelease(route, message)) return;
1254
1256
  this.assignedTopics.set(message.topicKey, message.topic);
@@ -2388,7 +2390,7 @@ var DedupManager = class {
2388
2390
  };
2389
2391
 
2390
2392
  // src/core/version.ts
2391
- var SDK_VERSION = true ? "0.21.5" : "";
2393
+ var SDK_VERSION = true ? "0.21.7" : "";
2392
2394
 
2393
2395
  // src/core/data-bus.ts
2394
2396
  var DEFAULT_REPLAY_MAX_PER_TOPIC = 100;
@@ -3590,4 +3592,4 @@ export {
3590
3592
  parseDataBusPublication,
3591
3593
  selectWorkerBackend
3592
3594
  };
3593
- //# sourceMappingURL=chunk-RWUDSL24.js.map
3595
+ //# sourceMappingURL=chunk-JQEKC5WW.js.map