Avoid duplicates in Observables list

This commit is contained in:
Andreas Hocevar
2017-06-12 08:24:44 +02:00
parent 107792635d
commit b3ddcd4ed9
2 changed files with 4 additions and 2 deletions

View File

@@ -16,8 +16,10 @@
<tbody>
<?js
var self = this;
var propsByName = {};
props.forEach(function(prop) {
if (!prop) { return; }
if (!prop || propsByName[prop.name]) { return; }
propsByName[prop.name] = prop;
var setter = prop.readonly ? 'no' : 'yes';
?>