Only add 'curlCommand' if the 'curl' class is used on a div

This commit is contained in:
Michel Cupurdija
2015-10-27 16:52:34 +01:00
parent 2fced78075
commit 24649aa848

View File

@@ -645,7 +645,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
//adds curl output
var curlCommand = this.model.asCurl(this.map);
curlCommand = curlCommand.replace('!', '!');
$( '.curl', $(this.el)).html('<pre>' + curlCommand + '</pre>');
$( 'div.curl', $(this.el)).html('<pre>' + curlCommand + '</pre>');
// only highlight the response if response is less than threshold, default state is highlight response
var opts = this.options.swaggerOptions;