diff --git a/core/modules/node/node.tokens.inc b/core/modules/node/node.tokens.inc
index 81fa3f0..a82089e 100644
--- a/core/modules/node/node.tokens.inc
+++ b/core/modules/node/node.tokens.inc
@@ -144,7 +144,7 @@ function node_tokens($type, $tokens, array $data, array $options, BubbleableMeta
                 // Get the 'trim_length' size used for the 'teaser' mode, if
                 // present, or use the default trim_length size.
                 $display_options = entity_get_display('node', $node->getType(), 'teaser')->getComponent('body');
-                if (isset($display_options['settings']['trim_length'])) {
+                if ($display_options['type'] == 'text_summary_or_trimmed' && isset($display_options['settings']['trim_length'])) {
                   $length = $display_options['settings']['trim_length'];
                 }
                 else {
