Skip to content

Commit

Permalink
default store.form.blocks to an empty object
Browse files Browse the repository at this point in the history
  • Loading branch information
zeezo887 committed May 3, 2024
1 parent 8611299 commit abd4d2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion views/partials/form/utils/_block_editor_store.blade.php
Original file line number Diff line number Diff line change
@@ -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) !!})
Expand Down

0 comments on commit abd4d2c

Please sign in to comment.