This commit is contained in:
Ondřej Žára 2020-06-12 16:34:33 +02:00
parent 9c66c7c1c1
commit f8dea00d8f
3 changed files with 6 additions and 6 deletions

View file

@ -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 [

View file

@ -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 [

View file

@ -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]"));