Permalink
Browse files

Merge pull request #31 from fabdouglas/patch-2

Reuse the current pattern as default on 'resetPattern ' call #31
2 parents 470d7bb + d52974d commit 571ee9338d0c7eacbc9a2e2d5ecea787ddb28a85 @jaridmargolin jaridmargolin committed Feb 28, 2014
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/formatter.js
View
@@ -106,6 +106,7 @@ Formatter.addInptType = function (chr, reg) {
//
Formatter.prototype.resetPattern = function (str) {
// Update opts to hold new pattern
+ str = str || this.opts.pattern;
this.opts.pattern = str;
// Get current state

0 comments on commit 571ee93

Please sign in to comment.