File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 4242 "babel" : " 5.8.21" ,
4343 "babel-runtime" : " ^5.8.x" ,
4444 "babel-core" : " 5.8.22" ,
45- "babel-eslint" : " 4.0.10 " ,
46- "chai" : " 3.2.0 " ,
47- "coveralls" : " 2.11.3 " ,
48- "eslint" : " 1.1.0 " ,
49- "eslint-plugin-babel" : " ^2.1.1 " ,
50- "flow-bin" : " 0.14.0 " ,
45+ "babel-eslint" : " 4.1.6 " ,
46+ "chai" : " 3.4.1 " ,
47+ "coveralls" : " 2.11.6 " ,
48+ "eslint" : " 1.10.3 " ,
49+ "eslint-plugin-babel" : " 2.2.0 " ,
50+ "flow-bin" : " 0.20.1 " ,
5151 "isparta" : " 3.0.3" ,
52- "mocha" : " 2.2.5 " ,
53- "sane" : " 1.1.3 "
52+ "mocha" : " 2.3.4 " ,
53+ "sane" : " 1.3.0 "
5454 }
5555}
Original file line number Diff line number Diff line change @@ -65,8 +65,11 @@ export default class DataLoader<K, V> {
6565 var shouldCache = ! options || options . cache !== false ;
6666
6767 // If caching and there is a cache-hit, return cached Promise.
68- if ( shouldCache && this . _promiseCache . has ( key ) ) {
69- return this . _promiseCache . get ( key ) ;
68+ if ( shouldCache ) {
69+ var cachedPromise = this . _promiseCache . get ( key ) ;
70+ if ( cachedPromise ) {
71+ return cachedPromise ;
72+ }
7073 }
7174
7275 // Otherwise, produce a new Promise for this value.
You can’t perform that action at this time.
0 commit comments