From 53d46d1cbe9ab79b08c9020f3dc6d290c226e9aa Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 13 Apr 2019 18:23:32 +0900 Subject: [PATCH] Fix error --- src/services/update-hashtag.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/services/update-hashtag.ts b/src/services/update-hashtag.ts index 6f6d5c4691..8dbbf04cbb 100644 --- a/src/services/update-hashtag.ts +++ b/src/services/update-hashtag.ts @@ -63,7 +63,9 @@ export async function updateHashtag(user: User, tag: string, isUserAttached = fa } } - q.execute(); + if (Object.keys(set).length > 0) { + q.execute(); + } } else { if (isUserAttached) { Hashtags.save({