diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-04-22 13:42:45 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-04-22 13:42:45 +0100 |
| commit | 4423acf4ff5124585d5d2483bd0651fa5c29e083 (patch) | |
| tree | 7bb3764f14352a282767ec3843848584b8d7a560 | |
| parent | 86d2aaed235cd354884d7e71ec4543f4c97e2c8b (diff) | |
Always create run matcher with options object
| -rw-r--r-- | lib/document-matchers.js | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/document-matchers.js b/lib/document-matchers.js index 8ed5e80..ae8a922 100644 --- a/lib/document-matchers.js +++ b/lib/document-matchers.js @@ -5,20 +5,15 @@ exports.run = run; function paragraph(options) { - options = options || {}; return new Matcher("paragraph", options); } function run(options) { - options = options || {}; - if (_.isString(options)) { - // TODO: this is deprecated, remove usages - options = {styleId: options}; - } return new Matcher("run", options); } function Matcher(elementType, options) { + options = options || {}; this._elementType = elementType; this._styleId = options.styleId; if (options.list) { |
