Skip to content

Commit f5bf330

Browse files
authored
[#111] Return if no source type is set (#112)
1 parent 30b5a0f commit f5bf330

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: apigee_api_catalog.module

+4
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ function apigee_api_catalog_form_node_form_alter(&$form, FormStateInterface $for
192192
function _apigee_api_catalog_form_node_form_validate(&$form, FormStateInterface $form_state) {
193193
$values = $form_state->getValues();
194194

195+
if (empty($values['field_apidoc_spec_file_source'])) {
196+
return;
197+
}
198+
195199
// Make sure the field_apidoc_spec (file) or field_apidoc_file_link (link)
196200
// is not empty, according to what was selected as the file source.
197201
$source = $values['field_apidoc_spec_file_source'][0]['value'] ?: NULL;

0 commit comments

Comments
 (0)