Skip to content

Unhandled TypeError with empty or malformed hlist

Latest
Compare
Choose a tag to compare
@xcarol xcarol released this 01 Nov 10:24
· 8 commits to master since this release
4db7fbb

The page with id: 8239846 has an empty or malformed hlist which throws a "TypeError: Invalid attempt to destructure non-iterable instance" exception.

the destructure in the parse method of hlist
let [, elements] = results;
assumes results to have content.

Here this condition is checked before, and if so, it returns an empty array.