Skip to content

Commit 6a80af4

Browse files
authored
Merge pull request #371 from canjs/fix-relative-paths
Fix a bug causing resources with relative paths to load the wrong URL
2 parents c4cda57 + 7563419 commit 6a80af4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

static/canjs.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ function navigate(href) {
218218
return xhr;
219219
},
220220
success: function(content) {
221+
222+
window.history.pushState(null, null, href);
223+
221224
// Google Analytics
222225
ga('send', 'pageview', window.location.pathname);
223226

@@ -270,8 +273,6 @@ function navigate(href) {
270273
if(searchControl.searchResultsCache){
271274
searchControl.renderSearchResults(searchControl.searchResultsCache);
272275
}
273-
274-
window.history.pushState(null, null, href);
275276
},
276277
error: function() {
277278
window.history.pushState(null, null, href);

0 commit comments

Comments
 (0)