Skip to content

Commit

Permalink
Use strict equality operator
Browse files Browse the repository at this point in the history
  • Loading branch information
maccabeelevine committed Sep 11, 2024
1 parent abcfd9e commit 965d0e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions themes/bootstrap3/js/hold.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ function setUpHoldRequestForm(recordId) {
// Make sure to compare locationID and defaultValue as Strings since locationID may be an integer
if (String(this.locationID) === String(defaultValue) ||
(defaultValue === '' && this.isDefault && $emptyOption.length === 0) ||
(response.data.locations.length == 1)) {
(response.data.locations.length === 1)) {
option.attr('selected', 'selected');
}
$select.append(option);
});
if (response.data.locations.length == 1) {
if (response.data.locations.length === 1) {
$emptyOption.attr('hidden', 'hidden');
$emptyOption.removeAttr('selected');
}
Expand Down
4 changes: 2 additions & 2 deletions themes/bootstrap5/js/hold.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ function setUpHoldRequestForm(recordId) {
// Make sure to compare locationID and defaultValue as Strings since locationID may be an integer
if (String(this.locationID) === String(defaultValue) ||
(defaultValue === '' && this.isDefault && $emptyOption.length === 0) ||
(response.data.locations.length == 1)) {
(response.data.locations.length === 1)) {
option.attr('selected', 'selected');
}
$select.append(option);
});
if (response.data.locations.length == 1) {
if (response.data.locations.length === 1) {
$emptyOption.attr('hidden', 'hidden');
$emptyOption.removeAttr('selected');
}
Expand Down

0 comments on commit 965d0e4

Please sign in to comment.