Skip to content

Commit

Permalink
fix: Fix loading validator forever. (#2936)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmoud-Emad authored Jun 10, 2024
1 parent 9d671ca commit 6f2ebd3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/playground/src/dashboard/components/add_ip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,15 @@ export default {
function gatewayCheck() {
const firstIP = publicIP?.value.split("/")[0];
const lastIP = toPublicIP?.value.split("/")[0];
let isRange = false;
if (!contains(publicIP.value, gateway.value)) {
try {
isRange = contains(publicIP.value, gateway.value);
} catch {
isRange = false;
}
if (!isRange) {
return {
message: "Gateway IP not in the provided IP range.",
};
Expand Down

0 comments on commit 6f2ebd3

Please sign in to comment.