diff --git a/hammer.js b/hammer.js index 008f29d47..522668899 100644 --- a/hammer.js +++ b/hammer.js @@ -1256,13 +1256,10 @@ var STATE_FAILED = 32; * @param {Object} options */ function Recognizer(options) { - // make sure, options are copied over to a new object to prevent leaking it outside - options = extend({}, options || {}); - this.id = uniqueId(); this.manager = null; - this.options = merge(options, this.defaults); + this.options = merge(options || {}, this.defaults); // default is enable true this.options.enable = ifUndefined(this.options.enable, true); diff --git a/src/recognizer.js b/src/recognizer.js index f9f1ec90c..f9c47d406 100644 --- a/src/recognizer.js +++ b/src/recognizer.js @@ -40,10 +40,13 @@ var STATE_FAILED = 32; * @param {Object} options */ function Recognizer(options) { + // make sure, options are copied over to a new object to prevent leaking it outside + options = extend({}, options || {}); + this.id = uniqueId(); this.manager = null; - this.options = merge(options || {}, this.defaults); + this.options = merge(options, this.defaults); // default is enable true this.options.enable = ifUndefined(this.options.enable, true);