Skip to content

Commit

Permalink
fixes leaky config
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired authored and arschmitz committed Nov 11, 2015
1 parent 70c2902 commit 189098f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ var FORCED_STOP = 2;
* @constructor
*/
function Manager(element, options) {
options = options || {};
var newOptions = options ? extend({}, options) : {};
this.options = merge(newOptions, Hammer.defaults);

this.options = merge(options, Hammer.defaults);
this.options.inputTarget = this.options.inputTarget || element;

this.handlers = {};
Expand All @@ -23,7 +23,7 @@ function Manager(element, options) {

toggleCssProps(this, true);

each(options.recognizers, function(item) {
each(this.options.recognizers, function(item) {
var recognizer = this.add(new (item[0])(item[1]));
item[2] && recognizer.recognizeWith(item[2]);
item[3] && recognizer.requireFailure(item[3]);
Expand Down

0 comments on commit 189098f

Please sign in to comment.