@colyseus/schema 3.0.33 → 3.0.34

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.
@@ -4608,7 +4608,8 @@ function getDecoderStateCallbacks(decoder) {
4608
4608
  }
4609
4609
  }
4610
4610
  }
4611
- else if ((change.op & OPERATION.ADD) === OPERATION.ADD && change.previousValue === undefined) {
4611
+ else if ((change.op & OPERATION.ADD) === OPERATION.ADD &&
4612
+ change.previousValue !== change.value) {
4612
4613
  // triger onAdd
4613
4614
  const addCallbacks = $callbacks[OPERATION.ADD];
4614
4615
  for (let i = addCallbacks?.length - 1; i >= 0; i--) {