feat: Enhance gateway initialization in EditServerModal by ensuring a default primary gateway is created when no gateways are specified, improving server configuration reliability.
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m56s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m56s
This commit is contained in:
@@ -1446,7 +1446,10 @@ function EditServerModal({ show, server, onChange, onSave, onClose }) {
|
||||
const ensureGateways = (srv) => {
|
||||
if (!srv) return {};
|
||||
const needs = NEEDS_GATEWAYS(srv.type);
|
||||
const gateways = needs ? normalizeGateways(srv.gateways, srv.gateway || srv.dns || srv.ip) : [];
|
||||
let gateways = needs ? normalizeGateways(srv.gateways, srv.gateway || srv.dns || srv.ip) : [];
|
||||
if (needs && gateways.length === 0) {
|
||||
gateways = [makeGateway({ primary: true })];
|
||||
}
|
||||
return { ...srv, gateways };
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user