Skip to content

Commit 1e019a3

Browse files
authored
Update RedactorInjectorWidget.php
1 parent d1f507a commit 1e019a3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/RedactorInjectorWidget.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ public function __construct()
2323

2424
public function run(array $params = []): ?string
2525
{
26-
// Only output when editing a page.
27-
if ($this->getExtension()->getRequest()->get('_route') !== 'bolt_content_edit') {
26+
// Only produce output when editing or creating a page.
27+
$route = $this->getExtension()->getRequest()->get('_route');
28+
if (!in_array($route, ['bolt_content_edit', 'bolt_content_new'])) {
2829
return null;
2930
}
3031

0 commit comments

Comments
 (0)