Fix bug#10932: JS error if no entry in queue list

This PR fixes bug#10932: JS error if no entry in queue list.