Skip to content
This repository was archived by the owner on Jul 26, 2022. It is now read-only.

Commit 3f207b0

Browse files
committed
Merge pull request #6 from paulirish/patch-1
clean up hasElements boolean
2 parents a567072 + ff54170 commit 3f207b0

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

js/content.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,8 @@ allElements = Array.prototype.slice.call(allElements).filter(function(el) {
1010
return el.localName.indexOf('-') != -1 || el.getAttribute('is');
1111
});
1212

13-
// Detects if there's a custom element
14-
var hasElements = false;
15-
16-
if (allElements.length > 0) {
17-
hasElements = true;
18-
}
13+
// Detects if there's >=1 custom elements
14+
var hasElements = !!allElements.length;
1915

2016
// Stores the element's default style
2117
var originalOutline = [];

0 commit comments

Comments
 (0)