fix save on non-codemirror-editor-pages

This commit is contained in:
Henrique Dias 2015-09-30 20:47:56 +01:00
parent 1ac0fc0008
commit c44dba20f1
3 changed files with 4 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -211,7 +211,7 @@ $(document).on('ready pjax:success', function() {
$('.CodeMirror').fadeIn();
// Save editor values
if (typeof editor !== 'undefined') {
if (typeof editor !== 'undefined' && editor) {
editor.save();
}
@ -252,7 +252,6 @@ $(document).on('ready pjax:success', function() {
event.preventDefault();
if ($("#new-admin-item-123").length) {
console.log("oi")
return false;
}