Skip to content

Commit e896363

Browse files
authored
Fix error if no argument is passed to constructor
1 parent 6dd6380 commit e896363

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lru-cache.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
const lru = require('lru-cache');
22

33
module.exports = class LruCache {
4-
constructor({ maxItems }) {
4+
constructor(options) {
5+
const maxItems = options && options.maxItems
56
this.cache = lru(maxItems);
67
}
78

0 commit comments

Comments
 (0)