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.
@@ -1283,7 +1283,8 @@ var WorkerClusterRuntime = class {
1283
1283
  if (this.releaseHandoffOnUnsubscribe(message)) return;
1284
1284
  break;
1285
1285
  case CONTROL_ACTION.PUBLISH:
1286
- if (message.items && message.items.length > 0) {
1286
+ if (message.items !== void 0) {
1287
+ if (!Array.isArray(message.items) || message.items.length === 0) return;
1287
1288
  if (this.handlers.onPublishBatch) {
1288
1289
  this.handlers.onPublishBatch(message.topic, message.items);
1289
1290
  return;
@@ -1344,6 +1345,7 @@ var WorkerClusterRuntime = class {
1344
1345
  */
1345
1346
  handleRouteReleasedMessage(message) {
1346
1347
  if (message.targetWorkerId !== this.workerId) return;
1348
+ if (createOpaqueKey(message.topic) !== message.topicKey) return;
1347
1349
  const route = this.readRoute(message.topicKey);
1348
1350
  if (!route || this.isStaleRouteRelease(route, message)) return;
1349
1351
  this.assignedTopics.set(message.topicKey, message.topic);
@@ -2483,7 +2485,7 @@ var DedupManager = class {
2483
2485
  };
2484
2486
 
2485
2487
  // src/core/version.ts
2486
- var SDK_VERSION = true ? "0.21.5" : "";
2488
+ var SDK_VERSION = true ? "0.21.7" : "";
2487
2489
 
2488
2490
  // src/core/data-bus.ts
2489
2491
  var DEFAULT_REPLAY_MAX_PER_TOPIC = 100;