Skip to content

Commit

Permalink
fix(channel closed): fix ts errors
Browse files Browse the repository at this point in the history
  • Loading branch information
srz09 committed Dec 13, 2019
1 parent 60f3032 commit c33791f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/module/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { MessageOptions } from './interfaces';
import { events } from './events';
import { ConnectionManager } from './managers';

function handleChannelClosedError(cb, ...options) {
function handleChannelClosedError(cb, ...options): boolean {
try {
cb(...options);
return cb(...options);
} catch (err) {
if (err.message && err.message.toLowerCase().includes('channel closed')) {
// Add the code for this error, so it can be handled later
Expand Down

0 comments on commit c33791f

Please sign in to comment.