Skip to content

Commit f68c569

Browse files
authored
Merge pull request #2211 from didi/feat-nativecomponent-style
fix: 修复输出RN style传递对象时出现非预期样式
2 parents b3ebb9b + cb65e3c commit f68c569

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/utils/src/base.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ const hasProto = '__proto__' in {}
8282
function cached (fn) {
8383
const cache = Object.create(null)
8484
return function cachedFn (str) {
85+
if (typeof str !== 'string') {
86+
return fn(str)
87+
}
8588
const hit = cache[str]
8689
return hit || (cache[str] = fn(str))
8790
}

0 commit comments

Comments
 (0)