From 4423acf4ff5124585d5d2483bd0651fa5c29e083 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 22 Apr 2014 13:42:45 +0100 Subject: Always create run matcher with options object --- lib/document-matchers.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib') 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) { -- cgit v1.2.3