breeze-client 2.1.7 → 2.2.0-cjs

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.
@@ -3201,8 +3201,9 @@ function coerceToDate(source, sourceTypeName) {
3201
3201
  var val;
3202
3202
  if (sourceTypeName === "string") {
3203
3203
  var src = source.trim();
3204
- if (src === "")
3204
+ if (!source || !source.trim()) {
3205
3205
  return null;
3206
+ }
3206
3207
  val = new Date(Date.parse(src));
3207
3208
  return core.isDate(val) ? val : source;
3208
3209
  }
@@ -3216,7 +3217,9 @@ function coerceToDate(source, sourceTypeName) {
3216
3217
  function coerceToDateOnly(source, sourceTypeName) {
3217
3218
  var val;
3218
3219
  if (sourceTypeName === "string") {
3219
- var src = source.trim();
3220
+ if (!source || !source.trim()) {
3221
+ return null;
3222
+ }
3220
3223
  val = DataType.parseDateAsLocal(val);
3221
3224
  return core.isDate(val) ? val : source;
3222
3225
  }