Better error handling in remoteMap

This commit is contained in:
Danielv123 committed 2017-12-12 21:43:03 +01:00
1 parent 51c644203e
commit 0df3c0c14f
1 file changed
+2 -2
+2 -2
View File
@@ -48,11 +48,11 @@ class remoteMap {
if(name == "deleted"){
this.chunkMap.setEntity(xPos, yPos, "delete this entity").then(data => {
this.messageInterface("Deleted data "+data.position.x+", "+data.position.y);
}).catch((err)=>messageInterface(err));
}).catch((err)=>this.messageInterface(err));
} else {
this.chunkMap.setEntity(xPos, yPos, {name}).then(data => {
this.messageInterface("Added "+name+" to data "+data.position.x+", "+data.position.y);
}).catch((err)=>messageInterface(err));
}).catch((err)=>this.messageInterface(err));
}
}