Skip to content

Commit

Permalink
🎨 refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Knovour committed Nov 7, 2019
1 parent b8aca2a commit 0c98e7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function crawlContent($, $content, crawlData) {
function grabValue($elem, json) {
const result = format($elem, json.get)

if(result === '' || result === null || typeof result === 'undefined')
if(['', null, undefined].includes(result))
return ('default' in json) ? json.default : result

if('default' in json && result === json.default)
Expand Down

0 comments on commit 0c98e7d

Please sign in to comment.