Skip to content

Commit

Permalink
Merge pull request #32 from wri/content-moderation-error
Browse files Browse the repository at this point in the history
If you have workflow enabled on something other than a node, this cau…
  • Loading branch information
mariacha authored Dec 7, 2021
2 parents 6726037 + 7c6767d commit f85ef31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/wri_admin/wri_admin.module
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function wri_admin_form_alter(&$form, FormStateInterface $form_state, $form_id)
}
elseif ($form_id == 'content_moderation_entity_moderation_form') {
$node = $form_state->get('entity');
if ($node) {
if ($node && $node instanceof Node) {
$published_node = Node::load($node->id());
$form['link_to_revision'] = [
'#title' => t('Compare to published'),
Expand Down

0 comments on commit f85ef31

Please sign in to comment.