Ignore whitespace from file.

This commit is contained in:
BurnyLlama 2022-06-01 12:41:42 +02:00
parent 005799b398
commit 274375b3e0

View File

@ -8,7 +8,7 @@ if (!fs.existsSync("./ip.cache")) fs.writeFileSync("./ip.cache", "")
const log = getLogger("IP Watcher", settings.checkers["ip-changed"].color)
const getIp = async () => await publicIp.v4({ onlyHttps: true })
const currentIp = await getIp()
const currentIp = await getIp().replace(/\s/g, "")
const cachedOldIp = fs.readFileSync("./ip.cache").toString()
let oldIp = cachedOldIp ? cachedOldIp : currentIp