We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49a66a7 commit d34ee83Copy full SHA for d34ee83
src/FieldType/FlexibleContent.php
@@ -49,6 +49,12 @@ public static function register_field_type(): void {
49
}
50
51
$layouts = [];
52
+
53
+ // If there are no layouts, return a NULL type
54
+ if ( empty( $acf_field['layouts'] ) ) {
55
+ return 'NULL';
56
+ }
57
58
foreach ( $acf_field['layouts'] as $layout ) {
59
$layout_type_name = Utils::format_type_name( $layout_interface_prefix . ' ' . $field_config->get_registry()->get_field_group_graphql_type_name( $layout ) ) . 'Layout';
60
$layout['interfaces'] = [ $layout_interface_name ];
0 commit comments