apollo-cache-router
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -154,3 +154,9 @@ (function (global, factory) { | ||
RoutingCache.prototype.recordOptimisticTransaction = function (transaction, id) { | ||
this.caches.forEach(function (cache) { return cache.recordOptimisticTransaction(transaction, id); }); | ||
var _this = this; | ||
for (var _i = 0, _a = this.caches; _i < _a.length; _i++) { | ||
var cache = _a[_i]; | ||
cache.recordOptimisticTransaction(function () { | ||
transaction(_this); | ||
}, id); | ||
} | ||
}; | ||
@@ -157,0 +163,0 @@ RoutingCache.prototype.transformDocument = function (document) { |
@@ -148,3 +148,9 @@ "use strict"; | ||
RoutingCache.prototype.recordOptimisticTransaction = function (transaction, id) { | ||
this.caches.forEach(function (cache) { return cache.recordOptimisticTransaction(transaction, id); }); | ||
var _this = this; | ||
for (var _i = 0, _a = this.caches; _i < _a.length; _i++) { | ||
var cache = _a[_i]; | ||
cache.recordOptimisticTransaction(function () { | ||
transaction(_this); | ||
}, id); | ||
} | ||
}; | ||
@@ -151,0 +157,0 @@ RoutingCache.prototype.transformDocument = function (document) { |
{ | ||
"name": "apollo-cache-router", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "Apollo Cache Router", | ||
@@ -5,0 +5,0 @@ "main": "./lib/bundle.umd.js", |
@@ -177,3 +177,7 @@ import { ApolloCache, Cache, Transaction } from 'apollo-cache'; | ||
public recordOptimisticTransaction(transaction: Transaction<any>, id: string): void { | ||
this.caches.forEach(cache => cache.recordOptimisticTransaction(transaction, id)); | ||
for (const cache of this.caches) { | ||
cache.recordOptimisticTransaction(() => { | ||
transaction(this); | ||
}, id); | ||
} | ||
} | ||
@@ -180,0 +184,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53537
579