Merge pull request #414 from Gozala/bug/regexp-keys
bindings should not be over-normalized if (key is set to null it should stay
This commit is contained in:
commit
fe7ad3bb0c
1 changed files with 2 additions and 1 deletions
|
|
@ -64,7 +64,8 @@ StateHandler.prototype = {
|
|||
if (binding.key) {
|
||||
binding.key = new RegExp('^' + binding.key + '$');
|
||||
} else if (Array.isArray(binding.regex)) {
|
||||
binding.key = new RegExp('^' + binding.regex[1] + '$');
|
||||
if (!('key' in binding))
|
||||
binding.key = new RegExp('^' + binding.regex[1] + '$');
|
||||
binding.regex = new RegExp(binding.regex.join('') + '$');
|
||||
} else if (binding.regex) {
|
||||
binding.regex = new RegExp(binding.regex + '$');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue