Skip to content

Commit 7888d3d

Browse files
committed
Addendum fix for #1026
Applying the new value caused a JavaScript exception.
1 parent beddc36 commit 7888d3d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/MetaModels/Dca/RenderSettings.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ public function pagePicker(DC_General $dataContainer)
6767
'\'title\':\'%2$s\',' .
6868
'\'url\': this.href + \'&value=\' + ' .
6969
// We have no access to the current value as MCW does not understand DCG so far. So we do it all in JS.
70-
'/{{link_url::([^}]*)}}/.exec($(\'ctrl_%3$s\').value)[1],\'id\':\'ctrl_%3$s\'}' .
70+
'(/{{link_url::([^}]*)}}/.test($(\'ctrl_%3$s\').value)' .
71+
' ? /{{link_url::([^}]*)}}/.exec($(\'ctrl_%3$s\').value)[1]' .
72+
' : \'\'),' .
73+
'\'id\':\'%3$s\',\'tag\':\'ctrl_%3$s\',\'self\':this}' .
7174
'); return false;">%4$s</a>',
7275
$url,
7376
specialchars(str_replace('\'', '\\\'', $environment->getTranslator()->translate('MOD.page.0'))),

0 commit comments

Comments
 (0)