Skip to content

Commit

Permalink
Merge pull request #88 from youliao/master
Browse files Browse the repository at this point in the history
data.tags.split fix
  • Loading branch information
AtoraSuunva committed Jul 13, 2022
2 parents 9b4a474 + 1611ca8 commit 5145679
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/structures/Post.ts
Expand Up @@ -80,11 +80,14 @@ function getTags(data: any): string[] {
)
} else if (data.tags) {
tags = data.tags.split(' ')
} else {
} else if(data.tag_string){
tags = data.tag_string
.split(' ')
.map((v: string): string => v.replace(/,/g, '').replace(/ /g, '_'))
}
else{
return [];
}

return tags.filter((v: string) => v !== '')
}
Expand Down

0 comments on commit 5145679

Please sign in to comment.