expensify-common 2.0.192 → 2.0.193

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Num.js CHANGED
@@ -175,8 +175,8 @@ exports.default = {
175
175
  * @returns {number} The amount of tax
176
176
  */
177
177
  calculateTaxFromPercentage(total, percentage) {
178
- const percentageAsDecimal = str_1.default.percentageStringToNumber(percentage) / 100;
179
- const divisor = percentage ? percentageAsDecimal + 1 : 1;
178
+ const percentageAsDecimal = percentage ? str_1.default.percentageStringToNumber(percentage) / 100 : 0;
179
+ const divisor = percentageAsDecimal + 1;
180
180
  return this.calculateTaxFromDivisor(total, divisor);
181
181
  },
182
182
  /**
package/dist/esm/Num.js CHANGED
@@ -170,8 +170,8 @@ export default {
170
170
  * @returns {number} The amount of tax
171
171
  */
172
172
  calculateTaxFromPercentage(total, percentage) {
173
- const percentageAsDecimal = Str.percentageStringToNumber(percentage) / 100;
174
- const divisor = percentage ? percentageAsDecimal + 1 : 1;
173
+ const percentageAsDecimal = percentage ? Str.percentageStringToNumber(percentage) / 100 : 0;
174
+ const divisor = percentageAsDecimal + 1;
175
175
  return this.calculateTaxFromDivisor(total, divisor);
176
176
  },
177
177
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expensify-common",
3
- "version": "2.0.192",
3
+ "version": "2.0.193",
4
4
  "author": "Expensify, Inc.",
5
5
  "description": "Expensify libraries and components shared across different repos",
6
6
  "homepage": "https://expensify.com",