Skip to content
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

Unhandled exception when paginating empty resultsets #143

Open
stanzahk opened this issue Mar 8, 2018 · 0 comments
Open

Unhandled exception when paginating empty resultsets #143

stanzahk opened this issue Mar 8, 2018 · 0 comments

Comments

@stanzahk
Copy link

stanzahk commented Mar 8, 2018

Hi,

i have set-up a view with filters.

When searching for a item and the result set is empty, the application dies with the following error:

`/usr/lib/node_modules/express-admin/lib/data/pagination.js:11
var total = parseInt(rows[0].count),
^

TypeError: Cannot read property 'count' of undefined
at /usr/lib/node_modules/express-admin/lib/data/pagination.js:11:37
at Query._callback (/usr/lib/node_modules/express-admin/lib/db/client.js:43:9)
at Query.Sequence.end (/usr/lib/node_modules/express-admin/node_modules/mysql/lib/protocol/sequences/Sequence.js:78:24)
at Query._handleFinalResultPacket (/usr/lib/node_modules/express-admin/node_modules/mysql/lib/protocol/sequences/Query.js:143:8)
at Query.EofPacket (/usr/lib/node_modules/express-admin/node_modules/mysql/lib/protocol/sequences/Query.js:127:8)
at Protocol._parsePacket (/usr/lib/node_modules/express-admin/node_modules/mysql/lib/protocol/Protocol.js:205:24)
at Parser.write (/usr/lib/node_modules/express-admin/node_modules/mysql/lib/protocol/Parser.js:62:12)
at Protocol.write (/usr/lib/node_modules/express-admin/node_modules/mysql/lib/protocol/Protocol.js:37:16)
at Socket. (/usr/lib/node_modules/express-admin/node_modules/mysql/lib/Connection.js:73:28)
at emitOne (events.js:96:13)
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant