You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.
Function Shopify.formatMoney from timber.js has a default thousands separator of ',' and therefore all cases in the below code from the same function produce a ',' thousands separator whereas the first two should not:
switch(formatString.match(placeholderRegex)[1]) {
case 'amount':
value = formatWithDelimiters(cents, 2);
break;
case 'amount_no_decimals':
value = formatWithDelimiters(cents, 0);
break;
case 'amount_with_comma_separator':
value = formatWithDelimiters(cents, 2, '.', ',');
break;
case 'amount_no_decimals_with_comma_separator':
value = formatWithDelimiters(cents, 0, '.', ',');
break;
}
I believe this:
thousands = defaultOption(thousands, ',');
Should be:
thousands = defaultOption(thousands, '');
The decimal and comma separator parameters are also in the wrong order in the calls in the case statements (or the formatWithDelimiters parameter list).
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Function
Shopify.formatMoney
fromtimber.js
has a default thousands separator of','
and therefore all cases in the below code from the same function produce a','
thousands separator whereas the first two should not:I believe this:
Should be:
The decimal and comma separator parameters are also in the wrong order in the calls in the case statements (or the
formatWithDelimiters
parameter list).The text was updated successfully, but these errors were encountered: