Use a default color (black) for labels from Trello

This commit is contained in:
Ghassen Rjab 2017-09-27 22:23:55 +01:00
parent f883757552
commit 109cd08151

View file

@ -113,7 +113,6 @@ export class TrelloCreator {
check(trelloLabels, [Match.ObjectIncluding({ check(trelloLabels, [Match.ObjectIncluding({
// XXX refine control by validating 'color' against a list of allowed // XXX refine control by validating 'color' against a list of allowed
// values (is it worth the maintenance?) // values (is it worth the maintenance?)
color: String,
name: String, name: String,
})]); })]);
} }
@ -184,7 +183,7 @@ export class TrelloCreator {
trelloBoard.labels.forEach((label) => { trelloBoard.labels.forEach((label) => {
const labelToCreate = { const labelToCreate = {
_id: Random.id(6), _id: Random.id(6),
color: label.color, color: label.color ? label.color : 'black',
name: label.name, name: label.name,
}; };
// We need to remember them by Trello ID, as this is the only ref we have // We need to remember them by Trello ID, as this is the only ref we have