diff --git a/javascript/tiny_mce_improvements.js b/javascript/tiny_mce_improvements.js index 633a5b3eb..7ab7a224b 100755 --- a/javascript/tiny_mce_improvements.js +++ b/javascript/tiny_mce_improvements.js @@ -58,7 +58,7 @@ LinkForm.prototype = { getAnchors: function() { var raw = tinyMCE.activeEditor.getContent().match(/name="([a-zA-Z0-9-_]+?)"/gim); - if (raw.length) { + if (raw && raw.length) { var anchors = new Array(); for(var i = 0; i < raw.length; i++) { anchors.push(raw[i].substr(6).replace(/"$/, ''));