fix: fix undefined error for database length

This commit is contained in:
Marius
2024-06-07 13:04:30 +02:00
parent 65254f1686
commit 936cf76a4c
10 changed files with 10 additions and 10 deletions

View File

@@ -79,7 +79,7 @@ export const ShowExternalRedisCredentials = ({ redisId }: Props) => {
const hostname = window.location.hostname;
const port = form.watch("externalPort") || data?.externalPort;
return `redis://default:${'*'.repeat(data?.databasePassword.length)}@${hostname}:${port}`;
return `redis://default:${'*'.repeat(data?.databasePassword.length || 8)}@${hostname}:${port}`;
};
setConnectionUrl(buildConnectionUrl());

View File

@@ -46,7 +46,7 @@ export const ShowInternalRedisCredentials = ({ redisId }: Props) => {
<Label>Internal Connection URL </Label>
<Input
disabled
value={`redis://default:${'*'.repeat(data?.databasePassword.length)}@${data?.appName}:6379`}
value={`redis://default:${'*'.repeat(data?.databasePassword.length || 8)}@${data?.appName}:6379`}
/>
</div>
</div>