Fix wrong boolean logic in embed_css

This commit is contained in:
Adrian Vollmer 2024-04-09 13:44:06 +02:00 committed by GitHub
parent bd6ad1fc69
commit b9e88c0fa9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -106,7 +106,7 @@ var embed_js = function(doc) {
var embed_css = function(doc) {
Array.from(doc.querySelectorAll("link")).forEach( link => {
if (link.getAttribute('rel') == 'stylesheet' && !link.getAttribute("href")) {
if (link.getAttribute('rel') == 'stylesheet' && link.getAttribute("href")) {
const style = doc.createElement("style");
var href = link.getAttribute('href');
let [path, get_parameters, anchor] = split_url(href);