Skip to content

Commit

Permalink
Use router.uiRoot in views, so we don't need to wait for Backbone.his…
Browse files Browse the repository at this point in the history
…tory to initilize
  • Loading branch information
KrzysztofMadejski committed May 4, 2015
1 parent d0b553d commit ce97046
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ gulp.task('copy', ['less'], function() {

// copy all files inside html folder
gulp
.src(['./src/main/html/**/*'])
.src(['./src/main/html/**/*','./src/main/html/.htaccess'])
.pipe(gulp.dest('./dist'))
.on('error', log);
});
Expand Down
2 changes: 1 addition & 1 deletion src/main/javascript/view/OperationView.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
this.parentId = this.model.parentId;
this.nickname = this.model.nickname;
this.model.encodedParentId = encodeURIComponent(this.parentId);
this.model.uiRoot = Backbone.history.root;
this.model.uiRoot = this.router.uiRoot;
return this;
},

Expand Down
2 changes: 1 addition & 1 deletion src/main/javascript/view/ResourceView.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SwaggerUi.Views.ResourceView = Backbone.View.extend({
if (this.model.description) {
this.model.summary = this.model.description;
}
this.model.uiRoot = Backbone.history.root;
this.model.uiRoot = this.router.uiRoot;
},

render: function(){
Expand Down

0 comments on commit ce97046

Please sign in to comment.