filter for plugins that have defined properties

This commit is contained in:
Iuri Matias 2018-05-29 09:36:27 -04:00
parent 3f20f400dd
commit 8458acd207
1 changed files with 2 additions and 0 deletions

View File

@ -111,6 +111,8 @@ Plugins.prototype.getPluginsProperty = function(pluginType, property, sub_proper
return plugin[property];
});
matchingProperties = matchingProperties.filter((property) => property);
//return flattened list
if (matchingProperties.length === 0) return [];
return matchingProperties.reduce((a,b) => { return a.concat(b); }) || [];