Skip to content

Commit

Permalink
Update init_tinymce.js
Browse files Browse the repository at this point in the history
(!'selector' in mce_conf) does not properly evaluate as this will only ever return a false result even if 'selector' is not present in mce_conf. The not operator '!' needs to be applied to the entire ('selector' in mce_conf) check for it to properly evaluate.
  • Loading branch information
carlkhenderson authored and claudep committed May 17, 2023
1 parent 8c16b57 commit 7756186
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tinymce/static/django_tinymce/init_tinymce.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
if (mce_conf.selector && mce_conf.selector.includes('__prefix__')) {
mce_conf.selector = `#${el.id}`;
}
else if (!'selector' in mce_conf) {
else if (!('selector' in mce_conf)) {
mce_conf['target'] = el;
}
if (el.dataset.mceGzConf) {
Expand Down

0 comments on commit 7756186

Please sign in to comment.