8000 修正 promise 调用 bug · HashCoding/boxbot@c16dcda · GitHub
[go: up one dir, main page]

Skip to content

Commit c16dcda

Browse files
committed
修正 promise 调用 bug
1 parent 11956f3 commit c16dcda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Application.prototype.hotkey = function (event) {
9090
var direction = {37: LEFT, 38: TOP, 39: RIGHT, 40: BOTTOM}[event.keyCode]
9191
if (typeof direction != 'undefined') {
9292
if (direction == this.boxbot.bot.getCurrentDirection()) {
93-
this.boxbot.run(this.boxbot.go).catch(function (e) {
93+
this.boxbot.run(this.boxbot.go).then(null, function (e) {
9494
console.log(e)
9595
})
9696
} else {

0 commit comments

Comments
 (0)
0