diff --git a/views/partials/form/utils/_block_editor_store.blade.php b/views/partials/form/utils/_block_editor_store.blade.php index 8c5e0cbf3..71e19803b 100644 --- a/views/partials/form/utils/_block_editor_store.blade.php +++ b/views/partials/form/utils/_block_editor_store.blade.php @@ -1,4 +1,4 @@ -window['{{ config('twill.js_namespace') }}'].STORE.form.blocks = {!! json_encode($form_fields['blocks'] ?? []) !!} +window['{{ config('twill.js_namespace') }}'].STORE.form.blocks = {!! json_encode($form_fields['blocks'] ?? (object)[]) !!} @foreach ($form_fields['blocksFields'] ?? [] as $field) window['{{ config('twill.js_namespace') }}'].STORE.form.fields.push({!! json_encode($field) !!})