@firebase/firestore 3.10.0-canary.965396d52 → 3.10.0-canary.a059af0e1

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.
package/dist/index.cjs.js CHANGED
@@ -70,7 +70,7 @@ b.MOCK_USER = new b("mock-user");
70
70
  * See the License for the specific language governing permissions and
71
71
  * limitations under the License.
72
72
  */
73
- let P = "9.19.0-canary.965396d52";
73
+ let P = "9.19.1-canary.a059af0e1";
74
74
 
75
75
  /**
76
76
  * @license
@@ -4817,7 +4817,16 @@ function ms() {
4817
4817
  }
4818
4818
  }
4819
4819
  };
4820
- return e && (n.fields.__previous_value__ = e), {
4820
+ // We should avoid storing deeply nested server timestamp map values
4821
+ // because we never use the intermediate "previous values".
4822
+ // For example:
4823
+ // previous: 42L, add: t1, result: t1 -> 42L
4824
+ // previous: t1, add: t2, result: t2 -> 42L (NOT t2 -> t1 -> 42L)
4825
+ // previous: t2, add: t3, result: t3 -> 42L (NOT t3 -> t2 -> t1 -> 42L)
4826
+ // `getPreviousValue` recursively traverses server timestamps to find the
4827
+ // least recent Value.
4828
+ return e && Ce(e) && (e = xe(e)), e && (n.fields.__previous_value__ = e),
4829
+ {
4821
4830
  mapValue: n
4822
4831
  };
4823
4832
  }(n, e) : t instanceof vs ? bs(t, e) : t instanceof Ps ? Vs(t, e) : function(t, e) {
@@ -20444,10 +20453,9 @@ function af(t, e) {
20444
20453
  // to the implementation in firestoreClientGetDocumentsViaSnapshotListener
20445
20454
  // above
20446
20455
  try {
20447
- if (Qu(await Sa(t))) {
20448
- const i = await Ca(t);
20449
- s.resolve(ku(i, e, n));
20450
- } else s.reject(new L(B.UNAVAILABLE, "Failed to get aggregate result because the client is offline."));
20456
+ // TODO(b/277628384): check `canUseNetwork()` and handle multi-tab.
20457
+ const i = await Ca(t);
20458
+ s.resolve(ku(i, e, n));
20451
20459
  } catch (t) {
20452
20460
  s.reject(t);
20453
20461
  }
@@ -20984,9 +20992,9 @@ function kf(t, e) {
20984
20992
  return s = Object.assign({
20985
20993
  useFetchStreams: e
20986
20994
  }, s), r._setSettings(s), r;
20987
- }), "PUBLIC").setMultipleInstances(!0)), app.registerVersion(v, "3.10.0-canary.965396d52", t),
20995
+ }), "PUBLIC").setMultipleInstances(!0)), app.registerVersion(v, "3.10.0-canary.a059af0e1", t),
20988
20996
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
20989
- app.registerVersion(v, "3.10.0-canary.965396d52", "cjs2017");
20997
+ app.registerVersion(v, "3.10.0-canary.a059af0e1", "cjs2017");
20990
20998
  }();
20991
20999
 
20992
21000
  exports.AbstractUserDataWriter = $l;