use startsWith

This commit is contained in:
Ludeeus 2021-02-16 17:11:09 +00:00
parent dbc3bc81a7
commit d9283c17eb

View File

@ -48,7 +48,7 @@ class HaMarkdownElement extends UpdatingElement {
node.host === "my.home-assistant.io" node.host === "my.home-assistant.io"
) { ) {
const hrefNodes = node.href.split("/"); const hrefNodes = node.href.split("/");
if (document.location.pathname.includes("hassio")) { if (document.location.pathname.startsWith("/hassio")) {
node.target = "_parent"; node.target = "_parent";
} else { } else {
node.target = "_self"; node.target = "_self";