diff --git a/src/Plugin/Field/FieldFormatter/DynamicEntityReferenceFormatterTrait.php b/src/Plugin/Field/FieldFormatter/DynamicEntityReferenceFormatterTrait.php
index a6d9fb9..e44d898 100644
--- a/src/Plugin/Field/FieldFormatter/DynamicEntityReferenceFormatterTrait.php
+++ b/src/Plugin/Field/FieldFormatter/DynamicEntityReferenceFormatterTrait.php
@@ -40,10 +40,7 @@ trait DynamicEntityReferenceFormatterTrait {
     foreach ($entities_items as $items) {
       foreach ($items as $item) {
         if (isset($target_entities[$item->target_type]) && isset($target_entities[$item->target_type][$item->target_id])) {
-          $item->originalEntity = $target_entities[$item->target_type][$item->target_id];
-        }
-        elseif ($item->hasNewEntity()) {
-          $item->originalEntity = $item->entity;
+          $item->entity = $target_entities[$item->target_type][$item->target_id];
         }
       }
     }
diff --git a/src/Tests/DynamicEntityReferenceTest.php b/src/Tests/DynamicEntityReferenceTest.php
index db6f7d8..690b564 100644
--- a/src/Tests/DynamicEntityReferenceTest.php
+++ b/src/Tests/DynamicEntityReferenceTest.php
@@ -394,4 +394,102 @@ class DynamicEntityReferenceTest extends WebTestBase {
 
   }
 
+  /**
+   * Tests node preview of dynamic entity reference field.
+   */
+  public function testNodePreview() {
+    \Drupal::service('module_installer')->install(array('taxonomy', 'node'));
+    $this->drupalCreateContentType(array('type' => 'article'));
+    $this->permissions = array(
+      'access content',
+      'administer nodes',
+      'administer node fields',
+      'create article content',
+    );
+    $this->adminUser = $this->drupalCreateUser($this->permissions);
+
+    $vocabulary = Vocabulary::create(array(
+      'name' => $this->randomMachineName(),
+      'vid' => Unicode::strtolower($this->randomMachineName()),
+      'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
+    ));
+    $vocabulary->save();
+
+    $term = Term::create(array(
+      'name' => $this->randomMachineName(),
+      'vid' => $vocabulary->id(),
+      'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
+    ));
+    $term->save();
+
+    $this->drupalLogin($this->adminUser);
+
+    // Add a new dynamic entity reference field.
+    $this->drupalGet('admin/structure/types/manage/article/fields/add-field');
+    $edit = array(
+      'label' => 'DER',
+      'field_name' => 'der',
+      'new_storage_type' => 'dynamic_entity_reference',
+    );
+    $this->drupalPostForm(NULL, $edit, t('Save and continue'));
+    $this->drupalPostForm(NULL, array(
+      'field_storage[cardinality]' => FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED,
+      'field_storage[settings][exclude_entity_types]' => FALSE,
+      'field_storage[settings][entity_type_ids][]' => array('taxonomy_term'),
+    ), t('Save field settings'));
+    $edit = array(
+      'field[settings][taxonomy_term][handler_settings][target_bundles]['. $vocabulary->id() .']' => $vocabulary->id(),
+      'field[settings][taxonomy_term][handler_settings][auto_create]' => TRUE,
+    );
+    $this->drupalPostForm(NULL, $edit, t('Save settings'));
+
+    // Test the node preview for existing term.
+    $this->drupalGet('node/add/article');
+    $this->assertField('field_der[0][target_id]', 'Found field_der field target id');
+    $this->assertField('field_der[0][target_type]', 'Found field_der field target type');
+    // Ensure that the autocomplete path is correct.
+    $input = $this->xpath('//input[@name=:name]', array(':name' => 'field_der[0][target_id]'))[0];
+    $expected_autocomplete_path = 'dynamic_entity_reference/autocomplete/field_der/node/article/taxonomy_term';
+    $this->assertTrue(strpos((string) $input['data-autocomplete-path'], $expected_autocomplete_path) !== FALSE);
+    $title = $this->randomMachineName();
+    $edit = array(
+      'field_der[0][target_id]' => $term->label() . ' (' . $term->id() . ')',
+      'field_der[0][target_type]' => 'taxonomy_term',
+      'title[0][value]' => $title,
+      'uid[0][target_id]' => $this->adminUser->label() . ' (' . $this->adminUser->id() . ')',
+    );
+
+    $this->drupalPostForm(NULL, $edit, t('Preview'));
+    $this->assertText($title);
+    $this->assertText($term->label());
+    // Back to node add page.
+    $this->clickLink('Back to content editing');
+    $this->assertFieldByName('field_der[0][target_id]', $term->label() . ' (' . $term->id() . ')');
+
+    // Test the node preview for new term.
+    $this->drupalGet('node/add/article');
+    $this->assertField('field_der[0][target_id]', 'Found field_der field target id');
+    $this->assertField('field_der[0][target_type]', 'Found field_der field target type');
+
+    // Ensure that the autocomplete path is correct.
+    $input = $this->xpath('//input[@name=:name]', array(':name' => 'field_der[0][target_id]'))[0];
+    $expected_autocomplete_path = 'dynamic_entity_reference/autocomplete/field_der/node/article/taxonomy_term';
+    $this->assertTrue(strpos((string) $input['data-autocomplete-path'], $expected_autocomplete_path) !== FALSE);
+    $new_term = $this->randomMachineName();
+    $edit = array(
+      'field_der[0][target_id]' => $new_term,
+      'field_der[0][target_type]' => 'taxonomy_term',
+      'title[0][value]' => $title,
+      'uid[0][target_id]' => $this->adminUser->label() . ' (' . $this->adminUser->id() . ')',
+    );
+
+    $this->drupalPostForm(NULL, $edit, t('Preview'));
+    $this->assertText($title);
+    $this->assertText($new_term);
+    // Back to node add page.
+    $this->clickLink('Back to content editing');
+    $this->assertFieldByName('field_der[0][target_id]', $new_term);
+
+  }
+
 }
