chore coto

This commit is contained in:
Cat /dev/Nulo 2023-12-22 17:54:07 -03:00
parent b77fe29ca1
commit 01f97140ec

View file

@ -19,9 +19,9 @@ function getEanFromText({ document }: Window) {
} }
function getPriceFromText({ document }: Window) { function getPriceFromText({ document }: Window) {
const el = document.querySelector(".atg_store_newPrice"); const el = document.querySelector(".atg_store_newPrice");
if (!el) throw new Error("no encuentro el precio"); if (!el?.textContent) throw new Error("no encuentro el precio");
const nStr = el const nStr = el.textContent
.textContent!.trim() .trim()
.replace("$", "") .replace("$", "")
.replaceAll(".", "") .replaceAll(".", "")
.replace(",", "."); .replace(",", ".");