Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/util/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function cached(fn) {
return function (str) {
const key = isPrimitive(str) ? str : JSON.stringify(str);
const hit = cache[key];
return hit || (cache[key] = fn(str));
return hit !== undefined ? hit : (cache[key] = fn(str));
};
}

Expand Down
Loading