Simplest form for single item array with object detection yet

This commit is contained in:
T-rav
2018-05-08 11:39:38 +02:00
parent ac0f2c13a2
commit bdd36cd9f4
+2 -10
View File
@@ -250,16 +250,8 @@ module.exports = (function() {
if(substitution instanceof Array && substitution.length == 1){
appendCell = true;
var properties = Object.getOwnPropertyNames(substitution[0]);
var pos = 0;
// scan for any arrays hanging off the properties of the object
while(pos < properties.length && appendCell){
var propertyToCheck = properties[pos];
// if current property to update contains an array of primatives,
if(substitution[0][propertyToCheck] instanceof Array && placeholder.key == propertyToCheck){
appendCell = false;
}
pos++;
if(substitution[0][placeholder.key] instanceof Array){
appendCell = false;
}
}
}