Skip to content

Commit

Permalink
fix(puppets): fixed the check where scraping result is evaluated
Browse files Browse the repository at this point in the history
  • Loading branch information
onderceylan committed Aug 19, 2019
1 parent 30341b7 commit b584be0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions puppets.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b584be0

Please sign in to comment.