diff --git a/libraries/LDML/index.js b/libraries/LDML/index.js index 73969da6..35d0477d 100644 --- a/libraries/LDML/index.js +++ b/libraries/LDML/index.js @@ -59,6 +59,8 @@ LDML.NumberComparisonGroupTypePrecedence = { */ LDML.prototype.parse = function(string) { + this.integerExample = null; + this.decimalExample = null; this.ruleAST = {}; this.lexer = new Lexer(string); this.currentToken = this.lexer.getNextToken(); diff --git a/libraries/MessageFormat/index.js b/libraries/MessageFormat/index.js index 4fe8c149..177537b6 100644 --- a/libraries/MessageFormat/index.js +++ b/libraries/MessageFormat/index.js @@ -879,7 +879,7 @@ MessageFormat.prototype._readPluralRules = function() { var pluralRule = pluralRules[count]; var case_ = count.replace('pluralRule-count-', ''); this.pluralRules[case_] = LDML.parse(pluralRule); - this.pluralRules[case_].example = LDML.integerExample; + this.pluralRules[case_].example = LDML.integerExample || LDML.decimalExample; } cache[this.languageTag].pluralRules = this.pluralRules; diff --git a/libraries/log.js b/libraries/log.js index d7fab27c..9365398c 100644 --- a/libraries/log.js +++ b/libraries/log.js @@ -1,6 +1,6 @@ -var file = require('./file') - , log = require('./_log'); +var file = require('./file'); +var log = require('./_log'); /** * Add terminal colors