mirror of
https://gitee.com/antv/g6.git
synced 2024-12-04 20:59:15 +08:00
Update shape.js
fix: missing cache ucfirst.
This commit is contained in:
parent
eeb48f0b39
commit
afc1c9dd8d
@ -10,7 +10,9 @@ const Shape = {};
|
||||
const cache = {}; // ucfirst 开销过大,进行缓存
|
||||
// 首字母大写
|
||||
function ucfirst(str) {
|
||||
cache[str] = cache[str] || Util.upperFirst(str);
|
||||
if (!cache[str]) {
|
||||
cache[str] = Util.upperFirst(str);
|
||||
}
|
||||
return cache[str];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user