-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
content.ForEach is not a function #1591
Comments
Cheerio.load expects there to be array. Older versions was there condition for checking, if it is not array. Seems like it is lost due to optimizations. |
Yeah, the input is an array. I don't get why it's having this error. |
sample from your code where it happens ...
const $ = cheerio.load(body);
const sensors = $('#orbSensorsList table tr.p_listRow').toArray();
const output = _.map(sensors, (sensor) => {
const theSensor = cheerio.load(sensor);
const theName = theSensor('a.p_deviceNameText').html();
...
})
... variable older version wraps it into array |
Oh haha! Totally missed that actually. |
Thanks for the report! This was already fixed in 0855be6, which should be part of a new release soon. |
@fb55 thanks the fix works for me when sourcing the public repository. Our implementation: // v1.0.0-rc.5
$("table[table] tr").each((index, element) => {
let issueHere = cheerio.load(element)
// ... |
Hello, any news about when this fix will be released? |
Hello, we are recently encountering this issue in our application as well, coming from a dependency that we are using. Could you tell us when the new version with the fix will be released? |
Hello, I am a developer of a Homebridge plugin, and I am having a user report this error:
More details in this issue
The text was updated successfully, but these errors were encountered: