fix out-of-date check, don't panic on failed ajax
[redakcja.git] / redakcja / static / js / wiki / wikiapi.js
index bce1f89..a518410 100644 (file)
             url: reverse("ajax_document_rev", self.id),
             dataType: 'text',
             success: function(data) {
-                if (data != self.revision)
+                if (data == '' && params.error)
                     params.error();
+                else if (data != self.revision)
+                    params.outdated();
             }
         });
     };