mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 21:45:37 +02:00
MDL-34990 fix JS error when moodlenolink button not present in toolbar
Thanks Rossiani Wijaya for discovering this issue!
This commit is contained in:
parent
730d005383
commit
5854be2587
@ -43,6 +43,10 @@
|
||||
ed.onNodeChange.add(function(ed, cm, n) {
|
||||
var p, c;
|
||||
c = cm.get('moodlenolink');
|
||||
if (!c) {
|
||||
// Button not used.
|
||||
return;
|
||||
}
|
||||
p = ed.dom.getParent(n, 'SPAN');
|
||||
|
||||
c.setActive(p && ed.dom.hasClass(p, 'nolink'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user