mirror of https://github.com/jetkvm/kvm.git
fix: remoteIPaddress can't be null
This commit is contained in:
parent
7d2fe79993
commit
d6d113e253
|
|
@ -129,9 +129,8 @@ export default function ConnectionStatsSidebar() {
|
||||||
</div>
|
</div>
|
||||||
</GridCard>
|
</GridCard>
|
||||||
<Button className="rounded-l-none border-l-slate-800/30 dark:border-slate-300/20" size="SM" type="button" theme="light" LeadingIcon={LuCopy} onClick={async () => {
|
<Button className="rounded-l-none border-l-slate-800/30 dark:border-slate-300/20" size="SM" type="button" theme="light" LeadingIcon={LuCopy} onClick={async () => {
|
||||||
const ip = remoteIPAddress || "";
|
if (await copy(remoteIPAddress)) {
|
||||||
if (await copy(ip)) {
|
notifications.success((m.connection_stats_remote_ip_address_copy_success({ ip: remoteIPAddress })));
|
||||||
notifications.success((m.connection_stats_remote_ip_address_copy_success({ ip })));
|
|
||||||
} else {
|
} else {
|
||||||
notifications.error(m.connection_stats_remote_ip_address_copy_error());
|
notifications.error(m.connection_stats_remote_ip_address_copy_error());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue