Fix hasOwnProperty
This commit is contained in:
parent
123d80bdb8
commit
bd8378159f
@ -17,7 +17,9 @@ function callRequest(action, section, message) {
|
|||||||
|
|
||||||
var buttons = document.querySelectorAll('#' + section + ' button');
|
var buttons = document.querySelectorAll('#' + section + ' button');
|
||||||
for (var button in buttons) {
|
for (var button in buttons) {
|
||||||
buttons[button].disabled = true;
|
if (buttons.hasOwnProperty(button)) {
|
||||||
|
buttons[button].disabled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
@ -39,7 +41,9 @@ function callRequest(action, section, message) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (var button in buttons) {
|
for (var button in buttons) {
|
||||||
buttons[button].disabled = false;
|
if (buttons.hasOwnProperty(button)) {
|
||||||
|
buttons[button].disabled = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
document.querySelector('#' + section + ' input').value = '';
|
document.querySelector('#' + section + ' input').value = '';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user