fix: removed silly '> 0' boolean check (#266)

This commit is contained in:
Ben Zörb 2019-11-15 23:57:15 +01:00
parent 13c65c8602
commit 90ddeaaf83

View File

@ -90,7 +90,7 @@ function inline(html, styles, options) {
}
}
if (Array.isArray(o.replaceStylesheets) > 0 && links.length > 0) {
if (Array.isArray(o.replaceStylesheets) && links.length > 0) {
// Detect links to be removed
const [ref] = links;
const removable = [...document.querySelectorAll('link[rel="stylesheet"], link[rel="preload"][as="style"]')].filter(