From 66eed481ea38200b005fb057be299a18f294a622 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 3 Mar 2017 20:11:31 +0900 Subject: [API] Fix bug --- src/api/endpoints/posts/mentions.ts | 2 +- src/api/endpoints/posts/reposts.ts | 2 +- src/api/endpoints/posts/timeline.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/api/endpoints/posts') diff --git a/src/api/endpoints/posts/mentions.ts b/src/api/endpoints/posts/mentions.ts index 59802c558a..a190b55f1b 100644 --- a/src/api/endpoints/posts/mentions.ts +++ b/src/api/endpoints/posts/mentions.ts @@ -36,7 +36,7 @@ module.exports = (params, user) => if (maxIdErr) return rej('invalid max_id param'); // Check if both of since_id and max_id is specified - if (sinceId !== null && maxId !== null) { + if (sinceId && maxId) { return rej('cannot set since_id and max_id'); } diff --git a/src/api/endpoints/posts/reposts.ts b/src/api/endpoints/posts/reposts.ts index d8410b322b..0c1fa9bbd1 100644 --- a/src/api/endpoints/posts/reposts.ts +++ b/src/api/endpoints/posts/reposts.ts @@ -34,7 +34,7 @@ module.exports = (params, user) => if (maxIdErr) return rej('invalid max_id param'); // Check if both of since_id and max_id is specified - if (sinceId !== null && maxId !== null) { + if (sinceId && maxId) { return rej('cannot set since_id and max_id'); } diff --git a/src/api/endpoints/posts/timeline.ts b/src/api/endpoints/posts/timeline.ts index 5744084932..c599c4ded7 100644 --- a/src/api/endpoints/posts/timeline.ts +++ b/src/api/endpoints/posts/timeline.ts @@ -32,7 +32,7 @@ module.exports = (params, user, app) => if (maxIdErr) return rej('invalid max_id param'); // Check if both of since_id and max_id is specified - if (sinceId !== null && maxId !== null) { + if (sinceId && maxId) { return rej('cannot set since_id and max_id'); } -- cgit v1.2.3-freya