Skip to content

Commit

Permalink
Change to arrow function
Browse files Browse the repository at this point in the history
  • Loading branch information
dailyrandomphoto committed Oct 10, 2019
1 parent f646a41 commit 1ff8265
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/plugins/helper/fragment_cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
module.exports = ctx => {
let cache = {};

ctx.on('generateBefore', function() {
// reset cache for watch mode
cache = {};
});
// reset cache for watch mode
ctx.on('generateBefore', () => { cache = {}; });

return function fragmentCache(id, fn) {
if (this.cache && cache[id] != null) return cache[id];
Expand Down

0 comments on commit 1ff8265

Please sign in to comment.