Skip to content

Commit

Permalink
use Object.prototype.hasOwnProperty (fixes issue with jQuery 3.5.0) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyjhol committed Apr 20, 2020
1 parent 397b065 commit 7f57268
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/bootstrap-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -3084,7 +3084,7 @@
var dataAttributes = $this.data();

for (var dataAttr in dataAttributes) {
if (dataAttributes.hasOwnProperty(dataAttr) && $.inArray(dataAttr, DISALLOWED_ATTRIBUTES) !== -1) {
if (Object.prototype.hasOwnProperty.call(dataAttributes, dataAttr) && $.inArray(dataAttr, DISALLOWED_ATTRIBUTES) !== -1) {
delete dataAttributes[dataAttr];
}
}
Expand All @@ -3094,7 +3094,7 @@
$this.data('selectpicker', (data = new Selectpicker(this, config)));
} else if (options) {
for (var i in options) {
if (options.hasOwnProperty(i)) {
if (Object.prototype.hasOwnProperty.call(options, i)) {
data.options[i] = options[i];
}
}
Expand Down

0 comments on commit 7f57268

Please sign in to comment.