优化 playlist

This commit is contained in:
Harvey Zack committed 2019-04-22 13:08:39 +08:00
1 parent 328d580fb7
commit 2385128abb
2 files changed
+5 -7

No files matched your search

+2 -2
View File
@@ -99,9 +99,9 @@ export function append(parent, child) {
if (child instanceof Element) {
parent.appendChild(child);
} else {
parent.insertAdjacentHTML('beforeend', child);
parent.insertAdjacentHTML('beforeend', String(child));
}
return parent.lastElementChild;
return parent.lastElementChild || parent.lastChild;
}
export function remove(child) {