aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/document-matchers.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/document-matchers.js b/lib/document-matchers.js
index 3232a23..a40bde7 100644
--- a/lib/document-matchers.js
+++ b/lib/document-matchers.js
@@ -16,5 +16,6 @@ function Matcher(elementType, styleName) {
}
Matcher.prototype.matches = function(element) {
- return element.type === this.elementType && element.styleName === this.styleName;
+ return element.type === this.elementType &&
+ (!this.styleName || element.styleName === this.styleName);
}