mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 11:46:19 +01:00
MDL-32106: fixed JS bug - when html element did not exist the script stopped
This commit is contained in:
parent
c856a1f60b
commit
400d228e51
@ -669,13 +669,13 @@ M.core_filepicker.init = function(Y, options) {
|
||||
params['author'] = author.get('value');
|
||||
}
|
||||
|
||||
if (this.options.env == 'editor') {
|
||||
if (this.options.externallink && this.options.env == 'editor') {
|
||||
// in editor, images are stored in '/' only
|
||||
params.savepath = '/';
|
||||
// when image or media button is clicked
|
||||
if ( this.options.return_types != 1 ) {
|
||||
var linkexternal = Y.one('#linkexternal-'+client_id).get('checked');
|
||||
if (linkexternal) {
|
||||
var linkexternal = Y.one('#linkexternal-'+client_id);
|
||||
if (linkexternal && linkexternal.get('checked')) {
|
||||
params['linkexternal'] = 'yes';
|
||||
}
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user