Skip to content

Commit 227f396

Browse files
committed
Updated built files
1 parent 9816284 commit 227f396

File tree

7 files changed

+15
-31
lines changed

7 files changed

+15
-31
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
(The MIT License)
44

5-
Copyright (C) 2011-2024 by Nick Payne <[email protected]>
5+
Copyright (C) 2011-2025 by Nick Payne <[email protected]>
66

77
Permission is hereby granted, free of charge, to any person obtaining a copy
88
of this software and associated documentation files (the "Software"), to deal

dist/LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
(The MIT License)
44

5-
Copyright (C) 2011-2024 by Nick Payne <[email protected]>
5+
Copyright (C) 2011-2025 by Nick Payne <[email protected]>
66

77
Permission is hereby granted, free of charge, to any person obtaining a copy
88
of this software and associated documentation files (the "Software"), to deal

dist/bootbox.all.js

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -586,19 +586,12 @@
586586
let value;
587587

588588
if (options.inputType === 'checkbox') {
589-
if (options.required === true) {
590-
if (input.find('input:checked').length > 0) {
591-
value = input.find('input:checked').map(function() {
592-
return $(this).val();
593-
}).get();
594-
} else {
595-
// prevents button callback from being called if no checkboxes have been checked
596-
return false;
597-
}
598-
} else {
599-
value = input.find('input:checked').map(function() {
600-
return $(this).val();
601-
}).get();
589+
value = input.find('input:checked').map(function() {
590+
return $(this).val();
591+
}).get();
592+
if (value.length === 0 && options.required === true) {
593+
// prevents button callback from being called if no checkboxes have been checked
594+
return false;
602595
}
603596
} else if (options.inputType === 'radio') {
604597
value = input.find('input:checked').val();

dist/bootbox.all.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/bootbox.js

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -582,21 +582,12 @@
582582
let value;
583583

584584
if (options.inputType === 'checkbox') {
585-
if(options.required === true) {
586-
if(input.find('input:checked').length > 0) {
587-
value = input.find('input:checked').map(function () {
588-
return $(this).val();
589-
}).get();
590-
}
591-
else {
585+
value = input.find('input:checked').map(function () {
586+
return $(this).val();
587+
}).get();
588+
if(value.length === 0 && options.required === true) {
592589
// prevents button callback from being called if no checkboxes have been checked
593590
return false;
594-
}
595-
}
596-
else {
597-
value = input.find('input:checked').map(function () {
598-
return $(this).val();
599-
}).get();
600591
}
601592
} else if (options.inputType === 'radio') {
602593
value = input.find('input:checked').val();

dist/bootbox.locales.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)