fixed when default value in a template attribute is a number and type = number checking fails fixed #130

This commit is contained in:
javi
2014-02-06 17:45:48 +01:00
parent 78f69d5236
commit f5e0d06e2f
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -557,7 +557,7 @@ o.instance = function(template, params) {
}
else if ( type === 'number' ) {
// check it's a number
if ( ! val.match(this._reNumber) ) {
if ( typeof(val) !== 'number' && ! val.match(this._reNumber) ) {
throw new Error("Invalid number value for template parameter '"
+ k + "': " + val);
}