Fix hasOwnProperty

This commit is contained in:
Michel Roux 2014-10-27 12:32:35 +01:00
parent 123d80bdb8
commit bd8378159f

View File

@ -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 = '';
} }