test media-tag, and fix the bug the tests exposed

This commit is contained in:
ansuz
2018-06-07 14:29:09 +02:00
parent bc57f8c274
commit eac7d38655
2 changed files with 23 additions and 2 deletions

View File

@@ -326,7 +326,7 @@
if (typeof(el) === "object" && el.jQuery) { el = el[0]; }
// Abort smoothly if the element is not a media-tag
if (el.nodeName !== "MEDIA-TAG") {
if (!el || el.nodeName !== "MEDIA-TAG") {
console.error("Not a media-tag!");
return {
on: function () { return this; }