fix:(small)开局马上点击工具栏再关闭会报错的bug

This commit is contained in:
ShakeFlower 2025-02-19 19:22:38 +08:00
parent c8956a15ae
commit e1f97be282

View File

@ -1537,7 +1537,7 @@ actions.prototype._clickToolbox = function (x, y) {
if (x >= this.LAST - 2 && y == this.LAST) { if (x >= this.LAST - 2 && y == this.LAST) {
core.playSound('取消'); core.playSound('取消');
core.ui.closePanel(); core.ui.closePanel();
var last = core.status.route[core.status.route.length - 1]; var last = core.status.route[core.status.route.length - 1] || '';
if (last.startsWith('equip:') || last.startsWith('unEquip:')) { if (last.startsWith('equip:') || last.startsWith('unEquip:')) {
core.status.route.push('no'); core.status.route.push('no');
} }