@tanstack/vue-query 4.29.10 → 4.29.11

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.
@@ -47,7 +47,7 @@
47
47
  return typeof value === 'number' && value >= 0 && value !== Infinity;
48
48
  }
49
49
  function difference(array1, array2) {
50
- return array1.filter(x => array2.indexOf(x) === -1);
50
+ return array1.filter(x => !array2.includes(x));
51
51
  }
52
52
  function replaceAt(array, index, value) {
53
53
  const copy = array.slice(0);
@@ -932,7 +932,7 @@
932
932
  }
933
933
 
934
934
  addObserver(observer) {
935
- if (this.observers.indexOf(observer) === -1) {
935
+ if (!this.observers.includes(observer)) {
936
936
  this.observers.push(observer); // Stop the query from being garbage collected
937
937
 
938
938
  this.clearGcTimeout();
@@ -945,7 +945,7 @@
945
945
  }
946
946
 
947
947
  removeObserver(observer) {
948
- if (this.observers.indexOf(observer) !== -1) {
948
+ if (this.observers.includes(observer)) {
949
949
  this.observers = this.observers.filter(x => x !== observer);
950
950
 
951
951
  if (!this.observers.length) {
@@ -1430,7 +1430,7 @@
1430
1430
  }
1431
1431
 
1432
1432
  addObserver(observer) {
1433
- if (this.observers.indexOf(observer) === -1) {
1433
+ if (!this.observers.includes(observer)) {
1434
1434
  this.observers.push(observer); // Stop the mutation from being garbage collected
1435
1435
 
1436
1436
  this.clearGcTimeout();