diff --git a/.vscode/settings.json b/.vscode/settings.json index 0e522f7..c504f74 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -62,6 +62,6 @@ "json.schemas": [], "eslint.format.enable": true, "editor.codeActionsOnSave": { - "source.fixAll.eslint": true, + "source.fixAll.eslint": "explicit" } } diff --git a/metsis/metsis_csv_bokeh/src/Form/MetsisCsvBokehDownloadForm.php b/metsis/metsis_csv_bokeh/src/Form/MetsisCsvBokehDownloadForm.php index 85b0748..2a590b1 100644 --- a/metsis/metsis_csv_bokeh/src/Form/MetsisCsvBokehDownloadForm.php +++ b/metsis/metsis_csv_bokeh/src/Form/MetsisCsvBokehDownloadForm.php @@ -258,8 +258,14 @@ public function adcGetCsvBokehPlotVars($data_uri, FormStateInterface $form_state // $response = new RedirectResponse($form_state->get('referer')); // $response->send(); - $url = Url::fromUri($form_state->get('referer')); - $form_state->setRedirectUrl($url); + if (NULL !== $form_state->get('referer')) { + $url = Url::fromUri($form_state->get('referer')); + $form_state->setRedirectUrl($url); + } + else { + $url = Url::fromUri('/metsis/search'); + $form_state->setRedirectUrl($url); + } // $form_state->setRedirect($form_state->get('referer')); return NULL;