Skip to content

Commit c9c5c3f

Browse files
authored
Merge pull request #8 from so-diao/dev
fix icons lose
2 parents 2301647 + 73cbd97 commit c9c5c3f

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

build/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ function toNames(name, styles) {
3636

3737
const data = {}
3838

39-
for ( const name in rawIcons ) {
40-
if ( rawIcons[name].private ) break
39+
const keys = Object.keys(rawIcons)
40+
keys.forEach(name =>{
41+
if ( rawIcons[name].private ) return
4142
const styles = rawIcons[name].styles
4243
const categories = getCategories(name)
4344

@@ -49,7 +50,8 @@ for ( const name in rawIcons ) {
4950

5051
data[item].icons.push(...toNames(name, styles))
5152
})
52-
}
53+
})
54+
5355

5456
// `Others' should be put last
5557
const others = data.others

0 commit comments

Comments
 (0)