Skip to content

Commit

Permalink
Merge pull request #18 from bwaidelich/bugfix/10-ignore-empty-properties
Browse files Browse the repository at this point in the history
BUGFIX: Ignore empty properties
  • Loading branch information
bwaidelich authored Jan 13, 2020
2 parents 701e629 + da0223e commit d03a085
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/NodeCreationHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function handle(NodeInterface $node, array $data)

foreach ($data as $propertyName => $propertyValue) {
$propertyType = TypeHandling::normalizeType($node->getNodeType()->getPropertyType($propertyName));
if ($propertyType !== 'references' && $propertyType !== 'reference' && $propertyType !== TypeHandling::getTypeForValue($propertyValue)) {
if ($propertyValue !== '' && $propertyType !== 'references' && $propertyType !== 'reference' && $propertyType !== TypeHandling::getTypeForValue($propertyValue)) {
$propertyValue = $this->propertyMapper->convert($propertyValue, $propertyType, $propertyMappingConfiguration);
}
if (substr($propertyName, 0, 1) === '_') {
Expand Down

0 comments on commit d03a085

Please sign in to comment.