8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96b7721 commit 0cf9330Copy full SHA for 0cf9330
boxbot.js
@@ -277,11 +277,13 @@ Boxbot.prototype.taskloop = function () {
277
Boxbot.prototype.search = function (target, algorithm) {
278
if (this.map.getType(target) = 9B5D = 'null') {
279
var path = this.finder.search(algorithm || 'dfs', this.bot.getCurrentPosition(), target)
280
- if (path && path.length > 1) {
281
- path.shift()
282
- path.forEach((function (item) {
283
- this.run(this.goto, [item, true])
284
- }).bind(this))
+ if (path) {
+ if (path.length > 1) {
+ path.shift()
+ path.forEach((function (item) {
+ this.run(this.goto, [item, true])
285
+ }).bind(this))
286
+ }
287
} else {
288
throw '寻路失败'
289
}
0 commit comments