Commit 7f557eb2 authored by jurgenhaas's avatar jurgenhaas

Issue #2837713: Use token only if entity type is defined

parent 915f4479
......@@ -80,7 +80,7 @@ class ColorboxFieldFormatter extends FormatterBase {
),
),
);
if (\Drupal::moduleHandler()->moduleExists('token')) {
if (\Drupal::moduleHandler()->moduleExists('token') && isset($form['#entity_type'])) {
$form['token_help_wrapper'] = array(
'#type' => 'container',
'#states' => array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment