Explicitly check for nulls

This commit is contained in:
Jeremy Dormitzer 2019-01-29 21:49:34 -05:00
parent 300908ddaf
commit 7ad4ca70ad

View File

@ -259,7 +259,7 @@ class ObjectsService
if ( $oldTargetObject && ! $oldTargetObject->hasField( 'id' ) ) {
$this->entityManager->remove( $oldTargetObject );
}
} else if ( ! $newValue ) {
} else if ( $newValue === null ) {
$object->removeField( $field );
$this->entityManager->persist( $object );
$this->entityManager->remove( $field );