@apollo/client 3.4.0 → 3.4.1

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.
@@ -1292,7 +1292,7 @@ var concat = ApolloLink.concat;
1292
1292
 
1293
1293
  var execute = ApolloLink.execute;
1294
1294
 
1295
- var version = '3.4.0';
1295
+ var version = '3.4.1';
1296
1296
 
1297
1297
  var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
1298
1298
  function parseAndCheckHttpResponse(operations) {
@@ -2237,6 +2237,9 @@ var ObjectCanon = (function () {
2237
2237
  }());
2238
2238
  var canonicalStringify = Object.assign(function (value) {
2239
2239
  if (isNonNullObject(value)) {
2240
+ if (stringifyCanon === void 0) {
2241
+ resetCanonicalStringify();
2242
+ }
2240
2243
  var canonical = stringifyCanon.admit(value);
2241
2244
  var json = stringifyCache.get(canonical);
2242
2245
  if (json === void 0) {
@@ -2246,12 +2249,14 @@ var canonicalStringify = Object.assign(function (value) {
2246
2249
  }
2247
2250
  return JSON.stringify(value);
2248
2251
  }, {
2249
- reset: function () {
2250
- stringifyCanon = new ObjectCanon;
2251
- },
2252
+ reset: resetCanonicalStringify,
2252
2253
  });
2253
- var stringifyCanon = new ObjectCanon;
2254
- var stringifyCache = new WeakMap();
2254
+ var stringifyCanon;
2255
+ var stringifyCache;
2256
+ function resetCanonicalStringify() {
2257
+ stringifyCanon = new ObjectCanon;
2258
+ stringifyCache = new (canUseWeakMap ? WeakMap : Map)();
2259
+ }
2255
2260
 
2256
2261
  function missingFromInvariant(err, context) {
2257
2262
  return new MissingFieldError(err.message, context.path.slice(), context.query, context.variables);