0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-26 07:22:44 +00:00

Back in Snippets Gen exclusion change

This commit is contained in:
David Bolack
2024-08-31 13:56:35 -05:00
parent 7b2e22fa23
commit 86d3a64e1f

View File

@@ -70,7 +70,9 @@ const Snippetbar = createClass({
mergeCustomizer : function(oldValue, newValue, key) {
if(key == 'snippets') {
const result = _.reverse(_.unionBy(_.reverse(newValue), _.reverse(oldValue), 'name')); // Join snippets together, with preference for the child theme over the parent theme
return _.filter(result, 'gen'); //Only keep snippets with a 'gen' property.
return _.filter(result, function(snip) {
return(snip.hasOwnProperty('gen') || snip.hasOwnProperty('subsnippets'));
});
}
},