Skip to content

Commit

Permalink
fix navigation path on subdirectory installation
Browse files Browse the repository at this point in the history
  • Loading branch information
wellingguzman committed Oct 27, 2016
1 parent cbfa7c4 commit 3bef401
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,11 +563,15 @@ require(["config", 'polyfills'], function() {
// Don't follow empty links
if (href.attr === '#') return;

// Remove the directus sub-path from the anchor href
// Backbone.history already have app.root as root.
var path = (href.attr || '').slice(app.root.length);

// `Backbone.history.navigate` is sufficient for all Routers and will
// trigger the correct events. The Router's internal `navigate` method
// calls this anyways. The fragment is sliced from the root.

Backbone.history.navigate(href.attr, true);
Backbone.history.navigate(path, true);
}
}).on('scroll', function(){
// Fade in header shadow based on scroll position
Expand Down

0 comments on commit 3bef401

Please sign in to comment.