Skip to content

Commit

Permalink
fixed ack in expressreceiver firing twice. Issue slackapi#327
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengill authored and seratch committed Jan 30, 2020
1 parent 13edd79 commit 5532ad9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ExpressReceiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5532ad9

Please sign in to comment.