Permalink
Browse files

fixes leaky config

  • Loading branch information...
runspired authored and arschmitz committed Oct 26, 2015
1 parent 70c2902 commit 189098ff7736f6ed2fce9a3d3e1f5a3afee085ba
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/manager.js
View
@@ -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 = {};
@@ -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]);

0 comments on commit 189098f

Please sign in to comment.