mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: match returns null on not-found, querying raw.length resulted in an error. Now it's possible to add links to the page again. (from r94378)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@95604 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
298ef035ed
commit
92439f2a1d
2
javascript/tiny_mce_improvements.js
vendored
2
javascript/tiny_mce_improvements.js
vendored
@ -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(/"$/, ''));
|
||||
|
Loading…
Reference in New Issue
Block a user