query.js: do not raise if the sort_on_option list is empty
src/queries
query.js +3 -0
test/queries
tests.js +24 -0
+ 3
- 0
+ 24
- 0
Fix the error
Error: TypeError: Cannot read property '0' of undefined
when synchronizing officejs apps (see https://nexedijs.erp5.net/#/bug_module/20190227-23F861F)
I confirm the synchro works again by applying this page locally.
I couldn't find where in the code (neither in jio and in ERP5) the sort_on
parameter set to []
. Maybe it's done dynamically somewhere (in replicate storage ?).
@romain : what do you think of this MR ?
Please add a test to reproduce the issue to fix and ensure jslint passes.
added 1 commit
Hi @romain ,
I pushed a test. I checked that without the fix in query.js this test raises.
Commits are already squashed. You can merge if you feel it is OK
merged
Files with large changes are collapsed by default.
Files with large changes are collapsed by default.