From b584be0f5244ca7e9a75c79835d592446443e4a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96nder=20Ceylan?= Date: Mon, 19 Aug 2019 12:59:33 +0200 Subject: [PATCH] fix(puppets): fixed the check where scraping result is evaluated --- puppets.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/puppets.js b/puppets.js index 9c1b3f78..75c2bee6 100644 --- a/puppets.js +++ b/puppets.js @@ -76,7 +76,7 @@ const getAppleSplashScreenData = async browser => { { selector: constants.APPLE_HIG_SPLASH_SCR_SPECS_DATA_GRID_SELECTOR }, ); - if (splashScreenData == null) { + if (!splashScreenData.length) { const err = `Failed scraping the data on web page ${constants.APPLE_HIG_SPLASH_SCR_SPECS_URL}`; logger.error(err); throw Error(err); @@ -145,7 +145,7 @@ const getDeviceScaleFactorData = async browser => { { selector: constants.APPLE_HIG_SPLASH_SCR_SPECS_DATA_GRID_SELECTOR }, ); - if (scaleFactorData == null) { + if (!scaleFactorData.length) { const err = `Failed scraping the data on web page ${constants.APPLE_HIG_DEVICE_SCALE_FACTOR_SPECS_URL}`; logger.error(err); throw Error(err);