@colyseus/schema 1.0.30 → 1.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.
@@ -620,7 +620,7 @@ class ArraySchema {
620
620
  * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
621
621
  */
622
622
  reduce(callbackfn, initialValue) {
623
- return Array.from(this.$items.values()).reduce(callbackfn, initialValue);
623
+ return Array.prototype.reduce.apply(Array.from(this.$items.values()), arguments);
624
624
  }
625
625
  /**
626
626
  * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
@@ -628,7 +628,7 @@ class ArraySchema {
628
628
  * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
629
629
  */
630
630
  reduceRight(callbackfn, initialValue) {
631
- return Array.from(this.$items.values()).reduceRight(callbackfn, initialValue);
631
+ return Array.prototype.reduceRight.apply(Array.from(this.$items.values()), arguments);
632
632
  }
633
633
  /**
634
634
  * Returns the value of the first element in the array where predicate is true, and undefined