Skip to content

Commit

Permalink
update p-cancelable
Browse files Browse the repository at this point in the history
  • Loading branch information
aoberoi committed Mar 8, 2019
1 parent e650d63 commit 62849bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -46,7 +46,7 @@
"@types/form-data": "^2.2.1",
"@types/is-stream": "^1.1.0",
"@types/node": ">=6.0.0",
"@types/p-cancelable": "^0.3.0",
"@types/p-cancelable": "^1.0.0",
"@types/p-queue": "^2.3.1",
"@types/p-retry": "^1.0.1",
"@types/retry": "^0.10.2",
Expand All @@ -59,7 +59,7 @@
"object.entries": "^1.0.4",
"object.getownpropertydescriptors": "^2.0.3",
"object.values": "^1.0.4",
"p-cancelable": "^0.3.0",
"p-cancelable": "^1.0.0",
"p-queue": "^2.3.0",
"p-retry": "^2.0.0",
"retry": "^0.12.0",
Expand Down
2 changes: 1 addition & 1 deletion src/RTMClient.ts
Expand Up @@ -470,7 +470,7 @@ export class RTMClient extends EventEmitter {
public addOutgoingEvent(awaitReply: false, type: string, body?: {}): Promise<void>;
public addOutgoingEvent(awaitReply: boolean, type: string, body?: {}): Promise<RTMCallResult | void> {
const awaitReplyTask = (messageId: number) => {
const replyPromise = new PCancelable<RTMCallResult>((onCancel, resolve, reject) => {
const replyPromise = new PCancelable<RTMCallResult>((resolve, reject, onCancel) => {
const eventHandler = (_type: string, event: RTMCallResult) => {
if (event.reply_to === messageId) {
this.off('slack_event', eventHandler);
Expand Down

0 comments on commit 62849bf

Please sign in to comment.