]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/utils.ts
Fix margin-content and miniature thumbnail width on mobile, fix media queries for...
[github/Chocobozzz/PeerTube.git] / server / models / utils.ts
index 7137419a2e3d34b2543befb5e5d7012e162c06e1..bdf2291f0ceb5b34ed3c089de5e71044ec7304b8 100644 (file)
@@ -208,13 +208,15 @@ function buildDirectionAndField (value: string) {
 }
 
 function searchAttribute (sourceField, targetField) {
-  return sourceField
-    ? {
+  if (sourceField) {
+    return {
       [targetField]: {
         [Op.iLike]: `%${sourceField}%`
       }
     }
-    : {}
+  } else {
+    return {}
+  }
 }
 
 // ---------------------------------------------------------------------------