]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/tag.ts
Import torrents with webtorrent
[github/Chocobozzz/PeerTube.git] / server / models / video / tag.ts
index 0ae74d80850bbe8f1b0d2a30754967863deb4a22..6d79a55756ad212f84977a383be0757525d950dd 100644 (file)
@@ -37,6 +37,8 @@ export class TagModel extends Model<TagModel> {
   Videos: VideoModel[]
 
   static findOrCreateTags (tags: string[], transaction: Transaction) {
+    if (tags === null) return []
+
     const tasks: Bluebird<TagModel>[] = []
     tags.forEach(tag => {
       const query = {