0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 22:52:40 +00:00

All Snippet entries that have subsnippets but not generators.

This commit is contained in:
David Bolack
2024-08-31 13:54:52 -05:00
parent c41116e6c8
commit 6f837980eb

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'));
});
}
},