瀏覽代碼

Use a default color (black) for labels from Trello

Ghassen Rjab 7 年之前
父節點
當前提交
109cd08151
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      models/trelloCreator.js

+ 1 - 2
models/trelloCreator.js

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