From 1d9785c2f2546acd35070eecf6224e264e968db0 Mon Sep 17 00:00:00 2001 From: i-just Date: Wed, 4 Dec 2024 10:50:34 +0000 Subject: [PATCH] store empty entry types props as null in the PC --- src/models/EntryType.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/models/EntryType.php b/src/models/EntryType.php index d0f4322b438..a1fd2e64be8 100644 --- a/src/models/EntryType.php +++ b/src/models/EntryType.php @@ -364,15 +364,15 @@ public function getConfig(): array $config = [ 'name' => $this->name, 'handle' => $this->handle, - 'icon' => $this->icon, + 'icon' => $this->icon ?: null, 'color' => $this->color?->value, 'hasTitleField' => $this->hasTitleField, 'titleTranslationMethod' => $this->titleTranslationMethod, - 'titleTranslationKeyFormat' => $this->titleTranslationKeyFormat, - 'titleFormat' => $this->titleFormat, + 'titleTranslationKeyFormat' => $this->titleTranslationKeyFormat ?: null, + 'titleFormat' => $this->titleFormat ?: null, 'showSlugField' => $this->showSlugField, 'slugTranslationMethod' => $this->slugTranslationMethod, - 'slugTranslationKeyFormat' => $this->slugTranslationKeyFormat, + 'slugTranslationKeyFormat' => $this->slugTranslationKeyFormat ?: null, 'showStatusField' => $this->showStatusField, ];