Skip to content

Commit

Permalink
Fixed a coding mistake:
Browse files Browse the repository at this point in the history
if(typeof something !== undefined) --> if(typeof something !== 'undefined')
  • Loading branch information
nakupanda committed Jun 11, 2014
1 parent 8714639 commit d364b82
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions dist/js/bootstrap-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,24 +468,24 @@
$button.prop('id', button.id);

// Icon
if (typeof button.icon !== undefined && $.trim(button.icon) !== '') {
if (typeof button.icon !== 'undefined' && $.trim(button.icon) !== '') {
$button.append(this.createButtonIcon(button.icon));
}

// Label
if (typeof button.label !== undefined) {
if (typeof button.label !== 'undefined') {
$button.append(button.label);
}

// Css class
if (typeof button.cssClass !== undefined && $.trim(button.cssClass) !== '') {
if (typeof button.cssClass !== 'undefined' && $.trim(button.cssClass) !== '') {
$button.addClass(button.cssClass);
} else {
$button.addClass('btn-default');
}

// Hotkey
if (typeof button.hotkey !== undefined) {
if (typeof button.hotkey !== 'undefined') {
this.registeredButtonHotkeys[button.hotkey] = $button;
}

Expand Down
2 changes: 1 addition & 1 deletion dist/js/bootstrap-dialog.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions examples/assets/bootstrap-dialog/js/bootstrap-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,24 +468,24 @@
$button.prop('id', button.id);

// Icon
if (typeof button.icon !== undefined && $.trim(button.icon) !== '') {
if (typeof button.icon !== 'undefined' && $.trim(button.icon) !== '') {
$button.append(this.createButtonIcon(button.icon));
}

// Label
if (typeof button.label !== undefined) {
if (typeof button.label !== 'undefined') {
$button.append(button.label);
}

// Css class
if (typeof button.cssClass !== undefined && $.trim(button.cssClass) !== '') {
if (typeof button.cssClass !== 'undefined' && $.trim(button.cssClass) !== '') {
$button.addClass(button.cssClass);
} else {
$button.addClass('btn-default');
}

// Hotkey
if (typeof button.hotkey !== undefined) {
if (typeof button.hotkey !== 'undefined') {
this.registeredButtonHotkeys[button.hotkey] = $button;
}

Expand Down

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions js/bootstrap-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,24 +468,24 @@
$button.prop('id', button.id);

// Icon
if (typeof button.icon !== undefined && $.trim(button.icon) !== '') {
if (typeof button.icon !== 'undefined' && $.trim(button.icon) !== '') {
$button.append(this.createButtonIcon(button.icon));
}

// Label
if (typeof button.label !== undefined) {
if (typeof button.label !== 'undefined') {
$button.append(button.label);
}

// Css class
if (typeof button.cssClass !== undefined && $.trim(button.cssClass) !== '') {
if (typeof button.cssClass !== 'undefined' && $.trim(button.cssClass) !== '') {
$button.addClass(button.cssClass);
} else {
$button.addClass('btn-default');
}

// Hotkey
if (typeof button.hotkey !== undefined) {
if (typeof button.hotkey !== 'undefined') {
this.registeredButtonHotkeys[button.hotkey] = $button;
}

Expand Down
2 changes: 1 addition & 1 deletion js/bootstrap-dialog.min.js

Large diffs are not rendered by default.

0 comments on commit d364b82

Please sign in to comment.