Skip to content

Commit

Permalink
fix(web): proper handle of the network prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Nov 5, 2024
1 parent 6027158 commit 9be5e7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/src/utils/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const isValidIp = (value: IPAddress["address"]) => ipaddr.IPv4.isValidFourPartDe
* @return true if given IP is valid; false otherwise.
*/
const isValidIpPrefix = (value: IPAddress["prefix"]) => {
const prefix = value as string;
const prefix = String(value);

if (prefix.match(/^\d+$/)) {
return parseInt(prefix) <= 32;
Expand Down

0 comments on commit 9be5e7d

Please sign in to comment.