Fix #116: update url before updating html content

This commit is contained in:
Samy Pessé
2014-04-18 15:49:53 +02:00
parent 49cde96ee7
commit ef4a8ea1b6
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -25,6 +25,8 @@ define([
return $.get(url)
.done(function (html) {
if (push) updateHistory(url, null);
html = html.replace( /<(\/?)(html|head|body)([^>]*)>/ig, function(a,b,c,d){
return '<' + b + 'div' + ( b ? '' : ' data-element="' + c + '"' ) + d + '>';
});
@@ -51,8 +53,6 @@ define([
// Update state
state.update($("html"));
if (push) updateHistory(url, null);
preparePage();
})
.fail(function () {