Skip to content

Commit

Permalink
Don't raise error if option is null
Browse files Browse the repository at this point in the history
  • Loading branch information
volkanceylan committed May 11, 2024
1 parent 50427c2 commit 7f1be99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/corelib/src/ui/editors/select2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ abstract class AbstractSelect2 {
if (select) {
// these options are not allowed when attached to a select because they are picked up off the element itself
["id", "multiple", "ajax", "query", "createSearchChoice", "initSelection", "data", "tags"].forEach(function (opt) {
if (opt in opts) {
if (opt in opts && ((opts as any)[opt] != null)) {
throw new Error("Option '" + this + "' is not allowed for Select2 when attached to a <select> element.");
}
});
Expand Down

0 comments on commit 7f1be99

Please sign in to comment.