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.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94378 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a783448266
commit
f2fd76f770
2
javascript/tiny_mce_improvements.js
vendored
2
javascript/tiny_mce_improvements.js
vendored
@ -60,7 +60,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