0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 20:42:43 +00:00

Update client/homebrew/editor/snippetbar/snippetbar.jsx

Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
This commit is contained in:
David Bolack
2024-09-06 01:25:13 -05:00
committed by GitHub
parent 6f837980eb
commit 5c9c342b10

View File

@@ -70,9 +70,7 @@ 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, function(snip) {
return(snip.hasOwnProperty('gen') || snip.hasOwnProperty('subsnippets'));
});
return result.filter(snip.gen || snip.subsnippets);
}
},