aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/document-matchers.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/document-matchers.js b/lib/document-matchers.js
index 58b3204..e681349 100644
--- a/lib/document-matchers.js
+++ b/lib/document-matchers.js
@@ -17,8 +17,8 @@ function Matcher(elementType, styleName) {
Matcher.prototype.matches = function(element) {
return element.type === this._elementType &&
- (!this._styleName || element.styleName === this._styleName) &&
- (!this._listIndex || isList(element, this._listIndex, this._listIsOrdered));
+ (this._styleName === undefined || element.styleName === this._styleName) &&
+ (this._listIndex === undefined || isList(element, this._listIndex, this._listIsOrdered));
}
Matcher.prototype.orderedList = function(levelIndex) {