Skip to content

Commit

Permalink
Remove null operator
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinNovak committed May 19, 2020
1 parent 7142e0f commit 88b92b3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions services/steam-scraper.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,11 @@ function getTitle(appPageHtml) {

let gameDetailsElement = $(
'.game_details .details_block:contains("Title:")'
)
.first()
?.html()
.trim();
).first();

if (gameDetailsElement) {
title = _regexUtils.extractTitle(gameDetailsElement);
let gameDetailsContent = gameDetailsElement.html().trim();
title = _regexUtils.extractTitle(gameDetailsContent);
}

return title;
Expand Down

0 comments on commit 88b92b3

Please sign in to comment.