From fd909336732af6b367f28a735ddd88ad6f4163c0 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Tue, 4 Dec 2018 18:58:39 +0800 Subject: [PATCH] non-null in location --- _server/editor.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/_server/editor.js b/_server/editor.js index 6a125e2e..89049bbd 100644 --- a/_server/editor.js +++ b/_server/editor.js @@ -1009,7 +1009,6 @@ editor.prototype.listen = function () { editor.updateMap(); fields.forEach(function(v){ editor.currentFloorData[v][now.x+','+now.y]=editor.currentFloorData[v][last.x+','+last.y] - if (!core.isset(editor.currentFloorData[v][now.x+','+now.y])) delete editor.currentFloorData[v][now.x+','+now.y]; }) editor.file.saveFloorFile(function (err) { if (err) { @@ -1054,10 +1053,8 @@ editor.prototype.listen = function () { fields.forEach(function(v){ var temp_atsfcytaf=editor.currentFloorData[v][now.x+','+now.y]; - if (!core.isset(editor.currentFloorData[v][last.x+','+last.y])) delete editor.currentFloorData[v][now.x+','+now.y]; - else editor.currentFloorData[v][now.x+','+now.y]=editor.currentFloorData[v][last.x+','+last.y]; - if (!core.isset(temp_atsfcytaf)) delete editor.currentFloorData[v][last.x+','+last.y]; - else editor.currentFloorData[v][last.x+','+last.y]=temp_atsfcytaf + editor.currentFloorData[v][now.x+','+now.y]=editor.currentFloorData[v][last.x+','+last.y]; + editor.currentFloorData[v][last.x+','+last.y]=temp_atsfcytaf; }) editor.file.saveFloorFile(function (err) { if (err) {