Skip to content

Commit

Permalink
only decorate when an event dispatcher was passed
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Jul 3, 2019
1 parent 205cd7a commit f19f28a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Workflow/Workflow.php
Expand Up @@ -43,7 +43,7 @@ public function __construct(Definition $definition, MarkingStoreInterface $marki
{
$this->definition = $definition;
$this->markingStore = $markingStore ?: new MultipleStateMarkingStore();
$this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher);
$this->dispatcher = null !== $dispatcher ? LegacyEventDispatcherProxy::decorate($dispatcher) : null;
$this->name = $name;
}

Expand Down

0 comments on commit f19f28a

Please sign in to comment.