Fix JS errors in source

This commit is contained in:
Mohsen Azimi
2015-03-12 16:04:02 -07:00
parent 215a8fa63e
commit 07d8a89c8f
2 changed files with 14 additions and 4 deletions

View File

@@ -62,7 +62,7 @@ var SwaggerUi = Backbone.Router.extend({
},
// Get the value of a previously set option
getOption(option) {
getOption: function(option) {
return this.options[option];
},
@@ -158,14 +158,20 @@ var SwaggerUi = Backbone.Router.extend({
},
// Shows message on topbar of the ui
showMessage: function(data = ''){
showMessage: function(data){
if (data === undefined) {
data = '';
}
$('#message-bar').removeClass('message-fail');
$('#message-bar').addClass('message-success');
$('#message-bar').html(data);
},
// shows message in red
onLoadFailure: function(data = ''){
onLoadFailure: function(data){
if (data === undefined) {
data = '';
}
$('#message-bar').removeClass('message-success');
$('#message-bar').addClass('message-fail');