diff --git a/resources/js/components/fieldtypes/replicator/Field.vue b/resources/js/components/fieldtypes/replicator/Field.vue index a2fd3c43ef..b0f5a0528b 100644 --- a/resources/js/components/fieldtypes/replicator/Field.vue +++ b/resources/js/components/fieldtypes/replicator/Field.vue @@ -9,7 +9,7 @@
@@ -37,7 +37,7 @@ v-html="instructions" />
- +
diff --git a/src/Http/Controllers/CP/Taxonomies/TaxonomiesController.php b/src/Http/Controllers/CP/Taxonomies/TaxonomiesController.php index 82cb5289bb..e3c19a43b7 100644 --- a/src/Http/Controllers/CP/Taxonomies/TaxonomiesController.php +++ b/src/Http/Controllers/CP/Taxonomies/TaxonomiesController.php @@ -133,8 +133,8 @@ public function edit($taxonomy) 'collections' => $taxonomy->collections()->map->handle()->all(), 'sites' => $taxonomy->sites()->all(), 'preview_targets' => $taxonomy->basePreviewTargets(), - 'term_template' => $taxonomy->termTemplate, - 'template' => $taxonomy->template, + 'term_template' => $taxonomy->hasCustomTermTemplate() ? $taxonomy->termTemplate() : null, + 'template' => $taxonomy->hasCustomTemplate() ? $taxonomy->template() : null, 'layout' => $taxonomy->layout(), ]; diff --git a/src/Taxonomies/Taxonomy.php b/src/Taxonomies/Taxonomy.php index 9b689730de..f9905c148c 100644 --- a/src/Taxonomies/Taxonomy.php +++ b/src/Taxonomies/Taxonomy.php @@ -518,4 +518,14 @@ private function previewTargetsForFile() ]; })->filter()->values()->all(); } + + public function hasCustomTemplate() + { + return $this->template !== null; + } + + public function hasCustomTermTemplate() + { + return $this->termTemplate !== null; + } }