Skip to content

Commit

Permalink
fix(ic): modify svgo config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Apr 16, 2023
1 parent 43f557d commit 7fa8f2a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions icons/ic/svgo.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ module.exports = {
item.attributes['style'] = str.replace(/block-progression:tb;-inkscape-font-specification:Sans/g, ``);
}
}
if (item.name === 'circle') {
//Fix: Type 'number' is not assignable to type 'string'.
const str = item.attributes['fill'];
if (str && !str.startsWith('#')) {
console.log('item:', str, item)
item.attributes['fill'] = `#${str}`;
}
}
});
},
}
Expand Down

0 comments on commit 7fa8f2a

Please sign in to comment.