8000 only decorate when an event dispatcher was passed · symfony/symfony@f19f28a · GitHub
[go: up one dir, main page]

Skip to content

Commit f19f28a

Browse files
committed
only decorate when an event dispatcher was passed
1 parent 205cd7a commit f19f28a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Workflow/Workflow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct(Definition $definition, MarkingStoreInterface $marki
4343
{
4444
$this->definition = $definition;
4545
$this->markingStore = $markingStore ?: new MultipleStateMarkingStore();
46-
$this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher);
46+
$this->dispatcher = null !== $dispatcher ? LegacyEventDispatcherProxy::decorate($dispatcher) : null;
4747
$this->name = $name;
4848
}
4949

0 commit comments

Comments
 (0)
0