diff --git a/app/cyp.js b/app/cyp.js index aecadc0..a96fefd 100644 --- a/app/cyp.js +++ b/app/cyp.js @@ -749,6 +749,8 @@ class Component extends HTMLElement { class Menu extends Component { connectedCallback() { + super.connectedCallback(); + /** @type HTMLElement[] */ this._tabs = Array.from(this.querySelectorAll("[data-for]")); @@ -1587,9 +1589,7 @@ const TAGS$1 = { function nonempty(str) { return (str.length > 0); } function createEnqueueCommand(node) { - if (node instanceof Song) { - return `add "${escape(node.data["file"])}"`; - } else if (node instanceof Path) { + if (node instanceof Song || node instanceof Path) { return `add "${escape(node.file)}"`; } else if (node instanceof Tag) { return [ diff --git a/app/js/elements/library.js b/app/js/elements/library.js index 6b2a83a..48ab7d3 100644 --- a/app/js/elements/library.js +++ b/app/js/elements/library.js @@ -17,9 +17,7 @@ const TAGS = { function nonempty(str) { return (str.length > 0); } function createEnqueueCommand(node) { - if (node instanceof Song) { - return `add "${escape(node.data["file"])}"`; - } else if (node instanceof Path) { + if (node instanceof Song || node instanceof Path) { return `add "${escape(node.file)}"`; } else if (node instanceof Tag) { return [ diff --git a/app/js/elements/menu.js b/app/js/elements/menu.js index 64f5a11..e4fe550 100644 --- a/app/js/elements/menu.js +++ b/app/js/elements/menu.js @@ -2,6 +2,8 @@ import Component from "../component.js"; class Menu extends Component { connectedCallback() { + super.connectedCallback(); + /** @type HTMLElement[] */ this._tabs = Array.from(this.querySelectorAll("[data-for]"));