Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit a390914

Browse files
author
Jacob Peddicord
committed
Fix licenses being reported as 'unknown'
1 parent 23c2c4f commit a390914

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/api/projects/validators.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ export async function attachPackage(req, res, next) {
119119
}
120120

121121
// ensure that all required questions (via tags) were answered
122-
const license = licenses[req.body.license];
123-
const tags = license ? license.tags : ['unknown'];
122+
const license = licenses.get(req.body.license);
123+
const tags = license ? license.get('tags').toArray() : ['unknown'];
124124
const questions: TagQuestions = tags.map((name) => mapTag(name).questions || {})
125125
.reduce((acc, curr) => ({
126126
...acc,

0 commit comments

Comments
 (0)