fable 3.0.82 → 3.0.83

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fable",
3
- "version": "3.0.82",
3
+ "version": "3.0.83",
4
4
  "description": "An entity behavior management and API bundling library.",
5
5
  "main": "source/Fable.js",
6
6
  "scripts": {
@@ -261,6 +261,11 @@ class DataFormat extends libFableServiceProviderBase
261
261
  return this._Value_NaN_Currency;
262
262
  }
263
263
 
264
+ if (pValue === null || pValue === undefined)
265
+ {
266
+ return this._Value_NaN_Currency;
267
+ }
268
+
264
269
  let tmpDollarAmountArbitrary = this.fable.Utility.bigNumber(pValue);
265
270
  let tmpDollarAmount = tmpDollarAmountArbitrary.toFixed(2);
266
271
 
@@ -300,6 +305,11 @@ class DataFormat extends libFableServiceProviderBase
300
305
  return tmpZed.toFixed(tmpDigits);
301
306
  }
302
307
 
308
+ if (pValue === null || pValue === undefined)
309
+ {
310
+ return '';
311
+ }
312
+
303
313
  let tmpAmountArbitrary = this.fable.Utility.bigNumber(pValue);
304
314
  let tmpValue = tmpAmountArbitrary.toFixed(tmpDigits);
305
315
 
@@ -88,6 +88,9 @@ suite
88
88
  Expect(_DataFormat
89
89
  .formatterDollars(10000))
90
90
  .to.equal('$10,000.00');
91
+ Expect(_DataFormat
92
+ .formatterDollars(null))
93
+ .to.equal('--');
91
94
  Expect(_DataFormat
92
95
  .formatterDollars(-8675309.75))
93
96
  .to.equal('$-8,675,309.75');
@@ -110,6 +113,9 @@ suite
110
113
  Expect(_DataFormat
111
114
  .formatterRoundNumber(1000, 2))
112
115
  .to.equal('1000.00');
116
+ Expect(_DataFormat
117
+ .formatterRoundNumber(null, 2))
118
+ .to.equal('');
113
119
  Expect(_DataFormat
114
120
  .formatterRoundNumber(1000.129, 2))
115
121
  .to.equal('1000.13');