Skip to content

Commit

Permalink
Fixed memoize decorator.
Browse files Browse the repository at this point in the history
Closes #1213.
  • Loading branch information
imolorhe committed Mar 30, 2020
1 parent 443e4f2 commit 435d363
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/altair-app/src/app/utils/memoize.ts
Expand Up @@ -3,7 +3,7 @@ import * as memoizee from 'memoizee';
export function memoize(): MethodDecorator {
return function(target, key, descriptor: PropertyDescriptor) {
const oldFn = descriptor.value;
const newFn = memoizee(oldFn);
const newFn = memoizee(oldFn, { max: 1 });
descriptor.value = function() {
return newFn.apply(this, arguments);
};
Expand Down

0 comments on commit 435d363

Please sign in to comment.