Skip to content

Commit 82a04fd

Browse files
committed
MOBILE-1447 media: Fix problem with source without type
1 parent 55e1d5f commit 82a04fd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

www/core/directives/external_content.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,12 @@ angular.module('mm.core')
4545
return;
4646
}
4747

48-
var e = document.createElement('source');
48+
var e = document.createElement('source'),
49+
type = dom.getAttribute('type');
4950
e.setAttribute('src', url);
50-
e.setAttribute('type', dom.getAttribute('type'));
51+
if (type) {
52+
e.setAttribute('type', type);
53+
}
5154
dom.parentNode.insertBefore(e, dom);
5255
}
5356

0 commit comments

Comments
 (0)