diff --git a/estimated_read_time.module b/estimated_read_time.module
index e892610..272c640 100644
--- a/estimated_read_time.module
+++ b/estimated_read_time.module
@@ -7,6 +7,7 @@
 
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\FieldableEntityInterface;
+use Drupal\node\Entity\Node;
 use Mtownsend\ReadTime\ReadTime;
 
 /**
@@ -29,7 +30,6 @@ function estimated_read_time_theme($existing, $type, $theme, $path) {
  * Implements hook_entity_presave().
  */
 function estimated_read_time_entity_presave(EntityInterface $entity) {
-  // Set the read time on an entity update.
   if (!$entity instanceof FieldableEntityInterface) {
     return;
   }
@@ -43,9 +43,22 @@ function estimated_read_time_entity_presave(EntityInterface $entity) {
  * @param \Drupal\Core\Entity\EntityInterface $entity
  *   The entity being acted on.
  */
-function estimated_read_time_set_estimated_read_time(EntityInterface &$entity) {
+function estimated_read_time_set_estimated_read_time(EntityInterface $entity) {
   $fieldDefinitions = $entity->getFieldDefinitions();
 
+  if ($entity instanceof Node) {
+    // Set in_preview to TRUE to prevent errors when rendering the links field
+    // without a node ID.
+    // In order to obtain the read time, the entity is rendered.
+    // The Links field that is displayed by default on nodes will throw an
+    // error if the node ID does not exist, which will occur for new nodes.
+    // The node module prevents this error from occurring when previewing a new
+    // node by setting the in_preview property and not building the links
+    // if in_preview is set to TRUE.
+    $inPreview = $entity->in_preview;
+    $entity->in_preview = TRUE;
+  }
+
   foreach ($fieldDefinitions as $field) {
     if ($field->getType() === 'estimated_read_time') {
       $name = $field->getName();
@@ -82,4 +95,10 @@ function estimated_read_time_set_estimated_read_time(EntityInterface &$entity) {
       ]);
     }
   }
+
+  if ($entity instanceof Node) {
+    // Set the in_preview property back to it's initial value. This should
+    // almost always be NULL.
+    $entity->in_preview = $inPreview;
+  }
 }
