We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b3ebb9b + cb65e3c commit f68c569Copy full SHA for f68c569
packages/utils/src/base.js
@@ -82,6 +82,9 @@ const hasProto = '__proto__' in {}
82
function cached (fn) {
83
const cache = Object.create(null)
84
return function cachedFn (str) {
85
+ if (typeof str !== 'string') {
86
+ return fn(str)
87
+ }
88
const hit = cache[str]
89
return hit || (cache[str] = fn(str))
90
}
0 commit comments