Skip to content

Commit 788927e

Browse files
committed
Bail out if the collection doesn't have a route
1 parent 89fffd3 commit 788927e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Entries/Entry.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,10 @@ public function save()
450450

451451
private function shouldUpdateUris(): bool
452452
{
453+
if (! $this->route()) {
454+
return false;
455+
}
456+
453457
$antlersRoute = preg_replace_callback('/{\s*([a-zA-Z0-9_\-]+)\s*}/', function ($match) {
454458
return "{{ {$match[1]} }}";
455459
}, $this->route());

0 commit comments

Comments
 (0)