Fix: Should not set null if height does not exist

This commit is contained in:
winkidney
2019-03-18 17:20:05 +08:00
committed by Isaac Bythewood
parent 5488927222
commit e1d245f531

View File

@@ -48,7 +48,7 @@ function HeightTable(blockMargin) {
};
function get(obj, index) {
if (!obj.data.hasOwnProperty(index)) {
obj.data[index] = null
return null
}
return obj.data[index];
}
@@ -73,8 +73,8 @@ function HeightTable(blockMargin) {
return height
}
self.get = function(index, value) {
return get(self, index, value);
self.get = function(index) {
return get(self, index);
};
self.set = function (index, value) {