Clean Snippet.js

This commit is contained in:
atomiks
2018-03-03 17:16:39 +10:00
parent 41f1d495a8
commit 0059fa8110

View File

@ -6,7 +6,7 @@ EventHub.on('Tag.click', data => {
snippet.style.display = 'block'
if (data.type === 'all') return
const tags = selectAll('.tags__tag', snippet)
if (!selectAll('.tags__tag', snippet).some(el => el.dataset.type === data.type)) {
if (!tags.some(el => el.dataset.type === data.type)) {
snippet.style.display = 'none'
}
})