Alerting: Fix returnTo expression being empty when no queryParam found (#75086)
Fix returnTo expression being empty when no queryParam found
This commit is contained in:
@@ -112,7 +112,7 @@ export const AlertRuleForm = ({ existing, prefill }: Props) => {
|
||||
const ruleType = translateRouteParamToRuleType(routeParams.type);
|
||||
const uidFromParams = routeParams.id;
|
||||
|
||||
const returnTo = String(queryParams['returnTo']) ?? '/alerting/list';
|
||||
const returnTo = !queryParams['returnTo'] ? '/alerting/list' : String(queryParams['returnTo']);
|
||||
const [showDeleteModal, setShowDeleteModal] = useState<boolean>(false);
|
||||
|
||||
const defaultValues: RuleFormValues = useMemo(() => {
|
||||
|
||||
Reference in New Issue
Block a user