mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 18:25:30 +00:00
Guard for in
This commit is contained in:
parent
3a119416ba
commit
92c1df41cc
3 changed files with 8 additions and 3 deletions
|
|
@ -22,6 +22,7 @@
|
|||
"dot-notation": [2, { "allowKeywords": false }],
|
||||
"eol-last": 2,
|
||||
"eqeqeq": [2, "smart"],
|
||||
"guard-for-in": 2,
|
||||
"indent": [2, 2, {"SwitchCase": 1}],
|
||||
"key-spacing": 1,
|
||||
"linebreak-style": 2,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@ function el(tagName, attributes, content) {
|
|||
content = [content];
|
||||
}
|
||||
for (var attr in attributes) {
|
||||
tag.setAttribute(attr, attributes[attr]);
|
||||
if (attributes.hasOwnProperty(attr)) {
|
||||
tag.setAttribute(attr, attributes[attr]);
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < content.length; i++) {
|
||||
if (typeof content[i] === 'string') {
|
||||
|
|
|
|||
|
|
@ -27,8 +27,10 @@ MultiDisplay.prototype.setRegisterText = function(register, text) {
|
|||
|
||||
MultiDisplay.prototype.showRegister = function(showKey) {
|
||||
for (var key in this.registers) {
|
||||
var display = (key === showKey) ? 'block' : 'none';
|
||||
this.registers[key].node.style.display = display;
|
||||
if (this.registers.hasOwnProperty(key)) {
|
||||
var display = (key === showKey) ? 'block' : 'none';
|
||||
this.registers[key].node.style.display = display;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue