@memberjunction/core
Advanced tools
Comparing version 0.9.44 to 0.9.45
@@ -107,3 +107,17 @@ "use strict"; | ||
else if (fieldInfo.DefaultValue) { | ||
this.Value = fieldInfo.DefaultValue; | ||
if (fieldInfo.TSType === entityInfo_1.EntityFieldTSType.Boolean) { | ||
// special handling for booleans as we don't want a string passed into a boolean field, we want a true boolean | ||
if (fieldInfo.DefaultValue === "1" || fieldInfo.DefaultValue === "true") | ||
this.Value = true; | ||
else | ||
this.Value = false; | ||
} | ||
else if (fieldInfo.TSType === entityInfo_1.EntityFieldTSType.Number) { | ||
// special handling for numbers as we don't want a string passed into a value for a numeric field | ||
this.Value = Number(fieldInfo.DefaultValue); | ||
} | ||
else { | ||
// for strings and dates, we're good to just set the value | ||
this.Value = fieldInfo.DefaultValue; | ||
} | ||
this._NeverSet = true; // set this back to true because we are setting the default value and we want to be able to set this ONCE from BaseEntity when we load | ||
@@ -110,0 +124,0 @@ } |
{ | ||
"name": "@memberjunction/core", | ||
"version": "0.9.44", | ||
"version": "0.9.45", | ||
"description": "MemberJunction: Core Library including Metadata, Application, Entity Retrieval and Manipulation, and Utilities", | ||
@@ -22,4 +22,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@memberjunction/global": "^0.9.44" | ||
"@memberjunction/global": "^0.9.45" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
320909
5034