Skip to content

Commit

Permalink
Merge branch 'ui/navbar' of github.com:ajaxorg/cloud9 into ui/navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben Daniels committed Apr 30, 2012
2 parents c64749e + f9a1683 commit 062f60f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/ext/revisions/revisions.js
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,9 @@ module.exports = ext.register("ext/revisions/revisions", {
if (self.changedPaths.indexOf(path) > -1) {
ide.addEventListener("afterreload", function onDocReload(data) {
if (data.doc === page.$doc) {
self.save(page, true);
// Surprisingly, afterreload event doesn't contain the updated
// documents content, so we must force a timeout.
setTimeout(function() { self.save(page, true); }, 100);
ide.removeEventListener("afterreload", onDocReload);
}
});
Expand Down Expand Up @@ -1213,7 +1215,7 @@ module.exports = ext.register("ext/revisions/revisions", {
if (!page)
return;

if (!forceSave && (!Util.pageHasChanged(page) || !Util.pageIsCode(page)))
if ((forceSave !== true) && (!Util.pageHasChanged(page) || !Util.pageIsCode(page)))
return;

var node = page.$doc.getNode();
Expand Down

0 comments on commit 062f60f

Please sign in to comment.