From ba4063ad40aa028cd02f0bfc2264da21ba681cf5 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Mon, 27 Jun 2022 14:39:50 +0200 Subject: [PATCH] Debug --- importGasStations.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/importGasStations.js b/importGasStations.js index a497935..60abf7a 100644 --- a/importGasStations.js +++ b/importGasStations.js @@ -140,11 +140,11 @@ const getStationName = (start, callback) => { callback(err); } else { const html = htmlparser(body); - const name = html - .querySelector("strong") - .toString() - .replace(/[<>/]/g, "") - .replace(/strong/g, ""); + const name = html? + .querySelector("strong")? + .toString()? + .replace(/[<>/]/g, "")? + .replace(/strong/g, "") || null; if (name) { item.name = name;