Skip to content
Snippets Groups Projects
Commit 9ef74f30 authored by Adam G-H's avatar Adam G-H
Browse files

Support Lightning Core 5.x (Drupal core 8.8.x).

parent 211142b3
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@
"drupal/autosave_form": "^1.0",
"drupal/conflict": "2.0-alpha1",
"drupal/diff": "^1.0",
"drupal/lightning_core": "^3.11 || ^4.1 || 3.x-dev || 4.x-dev",
"drupal/lightning_core": "3.* || 4.* || 5.*",
"drupal/moderation_dashboard": "^1.0",
"drupal/moderation_sidebar": "^1.2",
"oomphinc/composer-installers-extender": "^1.1"
......
......@@ -112,11 +112,16 @@ class ModerationStateWidget extends BaseModerationStateWidget {
// The latest revision, if there is one, is the canonical source of truth
// regarding scheduled transitions.
$latest_revision = $this->moderationInformation
->getLatestRevision(
$entity->getEntityTypeId(),
$entity->id()
) ?: $entity;
if ($entity->isNew()) {
$latest_revision = $entity;
}
else {
$latest_revision = $this->moderationInformation
->getLatestRevision(
$entity->getEntityTypeId(),
$entity->id()
) ?: $entity;
}
$transition_set = new TransitionSet(
$latest_revision->get('scheduled_transition_date'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment