From 6dd53fff4851f8f59222f01495f7a61385612e30 Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Fri, 10 Jan 2020 16:57:29 -0800 Subject: [PATCH] fixed ack in expressreceiver firing twice. Issue #327 --- src/ExpressReceiver.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ExpressReceiver.ts b/src/ExpressReceiver.ts index 7a810ef3c..ca2f094ca 100644 --- a/src/ExpressReceiver.ts +++ b/src/ExpressReceiver.ts @@ -88,8 +88,9 @@ export default class ExpressReceiver extends EventEmitter implements Receiver { clearTimeout(timer); timer = undefined; - if (!response) res.send(''); - if (typeof response === 'string') { + if (!response) { + res.send(''); + } else if (typeof response === 'string') { res.send(response); } else { res.json(response);