Templar.attribute('showIf',{ onChange : function(self, val){ let arrHasItems = (Array.isArray(val) && val.length > 0); debugger; if(arrHasItems || val === true || val == 'true' || parseInt(val) > 0){ self.style.display = ''; }else{ self.style.display = 'none'; } } });
if attribute is [], val is NOT array, rather it is the token (ie, {{model.someAttribute}} )