Skip to content

Commit a5f8a17

Browse files
carlo-quinonezJakeChampion
authored andcommitted
Coerce color to String
1 parent 49846a4 commit a5f8a17

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

bin/github-label-sync.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,11 @@ function merge(files) {
139139

140140
// Make sure leading `#` are stripped from the color property.
141141
Object.keys(data).forEach((key) => {
142-
const label = data[key];
143-
label.color = label.color.replace('#', '');
142+
const label = data[key];
143+
const color = String(label.color);
144+
if (color.startsWith('#')) {
145+
label.color = color.replace('#', '');
146+
}
144147
labels.push(label);
145148
});
146149

0 commit comments

Comments
 (0)