We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98cee8e commit be75357Copy full SHA for be75357
src/views/RedirectsView.vue
@@ -17,11 +17,15 @@ getRedirects().then((response) => {
17
});
18
19
const defaultEndpoint = (redirect: Redirect) => {
20
+ if (redirect.endpoints.length === 0) {
21
+ return "";
22
+ }
23
const defaultEndpoint = redirect.endpoints.find(
24
(endpoint) => endpoint.is_default
25
)?.endpoint;
26
if (!defaultEndpoint) {
- return null;
27
+ // just grab the first endpoint if there is no default
28
+ return removeProtocol(redirect.endpoints[0].endpoint);
29
}
30
return removeProtocol(defaultEndpoint);
31
};
0 commit comments