Index: src/js/i18n.js |
diff --git a/src/js/i18n.js b/src/js/i18n.js |
index d05da3ef993c540b0febcd60f2fa61a8468e3e0f..0d344d87d7581ccccc7fb9b2e04cad5968e476dc 100644 |
--- a/src/js/i18n.js |
+++ b/src/js/i18n.js |
@@ -1101,14 +1101,15 @@ function initializeNumberFormat(numberFormat, locales, options) { |
var mnfd = options['minimumFractionDigits']; |
var mxfd = options['maximumFractionDigits']; |
- if (!IS_UNDEFINED(mnfd) || !internalOptions.style === 'currency') { |
+ if (!IS_UNDEFINED(mnfd) || internalOptions.style !== 'currency') { |
mnfd = getNumberOption(options, 'minimumFractionDigits', 0, 20, 0); |
defineWEProperty(internalOptions, 'minimumFractionDigits', mnfd); |
} |
- if (!IS_UNDEFINED(mxfd) || !internalOptions.style === 'currency') { |
+ if (!IS_UNDEFINED(mxfd) || internalOptions.style !== 'currency') { |
+ var min_mxfd = internalOptions.style === 'percent' ? 0 : 3; |
mnfd = IS_UNDEFINED(mnfd) ? 0 : mnfd; |
- fallback_limit = (mnfd > 3) ? mnfd : 3; |
+ fallback_limit = (mnfd > min_mxfd) ? mnfd : min_mxfd; |
mxfd = getNumberOption(options, 'maximumFractionDigits', mnfd, 20, fallback_limit); |
defineWEProperty(internalOptions, 'maximumFractionDigits', mxfd); |
} |