bindings should be over-normalized if (key is set to null it should stay so).

This commit is contained in:
Irakli Gozalishvili 2011-09-08 12:07:15 +02:00
commit 182f08452c

View file

@ -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 + '$');