no next no match

This commit is contained in:
j 2018-03-07 16:53:54 +05:30
parent 9b8b6a1744
commit bcd5758b86

View file

@ -101,7 +101,7 @@ pandora.ui.textPanel = function(text, $toolbar) {
}
function getEmbedURLs(text) {
var matches = text.match(/<a [^<>]*?href="(.+?)".*?>/gi),
var matches = text ? text.match(/<a [^<>]*?href="(.+?)".*?>/gi) : [],
urls = [];
if (matches) {
matches.forEach(function(match) {