Calling Backbone.history.start later
This commit is contained in:
8
dist/swagger-ui.js
vendored
8
dist/swagger-ui.js
vendored
@@ -808,9 +808,6 @@ templates['resource'] = template(function (Handlebars,depth0,helpers,partials,da
|
||||
if (options == null) {
|
||||
options = {};
|
||||
}
|
||||
Backbone.history.start({
|
||||
pushState: true
|
||||
});
|
||||
if (options.dom_id != null) {
|
||||
this.dom_id = options.dom_id;
|
||||
delete options.dom_id;
|
||||
@@ -848,7 +845,10 @@ templates['resource'] = template(function (Handlebars,depth0,helpers,partials,da
|
||||
_ref.clear();
|
||||
}
|
||||
this.headerView.update(this.options.discoveryUrl, this.options.apiKey);
|
||||
return this.api = new SwaggerApi(this.options);
|
||||
this.api = new SwaggerApi(this.options);
|
||||
return Backbone.history.start({
|
||||
pushState: true
|
||||
});
|
||||
};
|
||||
|
||||
SwaggerUi.prototype.render = function() {
|
||||
|
||||
2
dist/swagger-ui.min.js
vendored
2
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -13,8 +13,6 @@ class SwaggerUi extends Backbone.Router
|
||||
|
||||
# SwaggerUi accepts all the same options as SwaggerApi
|
||||
initialize: (options={}) ->
|
||||
Backbone.history.start pushState: true
|
||||
|
||||
# Allow dom_id to be overridden
|
||||
if options.dom_id?
|
||||
@dom_id = options.dom_id
|
||||
@@ -48,6 +46,7 @@ class SwaggerUi extends Backbone.Router
|
||||
@mainView?.clear()
|
||||
@headerView.update(@options.discoveryUrl, @options.apiKey)
|
||||
@api = new SwaggerApi(@options)
|
||||
Backbone.history.start pushState: true
|
||||
|
||||
# This is bound to success handler for SwaggerApi
|
||||
# so it gets called when SwaggerApi completes loading
|
||||
|
||||
Reference in New Issue
Block a user