Comparing version 0.9.0 to 0.9.1
@@ -0,1 +1,5 @@ | ||
# 0.9.1 | ||
* Fix default property values overriding manually provided values | ||
# 0.9.0 | ||
@@ -2,0 +6,0 @@ |
@@ -44,4 +44,5 @@ "use strict"; | ||
var attrOptions = __assign({ path: key, type: attr.type, readOnly: attr.readOnly }, propOptions); | ||
// Check if the internal attribute type is ENUM, if so pre-populate values with relevant enum variants. | ||
if (attr.type.type === modelsafe_1.InternalAttributeType.ENUM) { | ||
// Check if the internal attribute type is ENUM, if so pre-populate values with relevant enum variants | ||
// (if no values have been provided manually). | ||
if (!_.isArray(attrOptions.values) && attr.type.type === modelsafe_1.InternalAttributeType.ENUM) { | ||
attrOptions.values = attr.type.options.values.map(function (v) { | ||
@@ -48,0 +49,0 @@ return { |
{ | ||
"name": "cruddle", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "bugs": "https://github.com/creativecuriositystudio/cruddle/issues", |
@@ -47,4 +47,5 @@ import * as _ from 'lodash'; | ||
// Check if the internal attribute type is ENUM, if so pre-populate values with relevant enum variants. | ||
if (attr.type.type === InternalAttributeType.ENUM) { | ||
// Check if the internal attribute type is ENUM, if so pre-populate values with relevant enum variants | ||
// (if no values have been provided manually). | ||
if (!_.isArray(attrOptions.values) && attr.type.type === InternalAttributeType.ENUM) { | ||
attrOptions.values = (<EnumAttributeTypeOptions> attr.type.options).values.map((v: any) => { | ||
@@ -51,0 +52,0 @@ return { |
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
417870
3555