Comments: Fixed failing tests due to unset template variable

This commit is contained in:
Dan Brown 2023-06-16 13:17:11 +01:00
parent 9a2ef7ef44
commit 88aae5b004
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9

View File

@ -42,6 +42,7 @@ class CommentController extends Controller
$comment = $this->commentRepo->create($page, $request->get('text'), $request->get('parent_id'));
return view('comments.comment-branch', [
'readOnly' => false,
'branch' => [
'comment' => $comment,
'children' => [],
@ -66,7 +67,7 @@ class CommentController extends Controller
$comment = $this->commentRepo->update($comment, $request->get('text'));
return view('comments.comment', ['comment' => $comment]);
return view('comments.comment', ['comment' => $comment, 'readOnly' => false]);
}
/**