mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
.html() can return null when querying an element that does not exist.
Repro:
const response = await axios.default.get('https://www.google.com/')
const $ = cheerio.load(response.data)
const foo = $('.bar').html()
console.log(`foo is: ${foo}`) //foo is: null
|
||
|---|---|---|
| .. | ||
| cheerio-tests.ts | ||
| index.d.ts | ||
| tsconfig.json | ||
| tslint.json | ||