mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-24 03:16:40 +00:00
Fix #116: update url before updating html content
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user