Skip to content

Commit

Permalink
modify
Browse files Browse the repository at this point in the history
  • Loading branch information
kobarei committed Oct 17, 2014
1 parent b08bddd commit a0d0914
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/chatwork-polling.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ChatworkTaskPolling extends EventEmitter

listenOpen: =>
@Room(id).Tasks().show "open", (err, tasks) =>
if @openLastTask == 0 && tasks[0] != undefined
if @openLastTask == 0 && tasks.length > 0
@robot.brain.set id, tasks[0].task_id
@robot.brain.save()

Expand Down

0 comments on commit a0d0914

Please sign in to comment.