Fix crash trying to index empty tags list

This commit is contained in:
Roman Hotsiy 2017-02-02 23:35:06 +02:00
parent 05be7561f0
commit 6fcee29b54
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -83,6 +83,7 @@ export class SearchService {
indexTags(swagger:SwaggerSpec) {
let tags = swagger.tags;
if (!tags) return;
for (let tag of tags) {
if (tag['x-traitTag']) continue;
let id = `tag/${slugify(tag.name)}`;