Update Snippet.js
This commit is contained in:
@ -4,9 +4,9 @@ const snippets = selectAll('.snippet')
|
||||
EventHub.on('Tag.click', data => {
|
||||
snippets.forEach(snippet => {
|
||||
snippet.style.display = 'block'
|
||||
if (data.type === 'all') return
|
||||
if (data.type.includes('all')) return
|
||||
const tags = selectAll('.tags__tag', snippet)
|
||||
if (!tags.some(el => el.dataset.type === data.type)) {
|
||||
if (!tags.some(el => data.type.includes(el.dataset.type))) {
|
||||
snippet.style.display = 'none'
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user