diff --git a/index.js b/index.js index 56d5817..1abb81b 100644 --- a/index.js +++ b/index.js @@ -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)