insert_tag - inserts only end tag, when no text selected - fixed.
[redakcja.git] / project / static / js / editor.js
index 0cbb934..f94d33c 100644 (file)
@@ -425,7 +425,7 @@ Editor.prototype.saveToBranch = function(msg)
                 if(self.autosaveTimer) {
                     clearTimeout(self.autosaveTimer);
                 }
                 if(self.autosaveTimer) {
                     clearTimeout(self.autosaveTimer);
                 }
-                if (data.warnings === null) {
+                if (data.warnings === null || data.warning === undefined) {
                     self.showPopup('save-successful');
                 } else {
                     self.showPopup('save-warn', data.warnings[0]);
                     self.showPopup('save-successful');
                 } else {
                     self.showPopup('save-warn', data.warnings[0]);