Fix #89, fix #73 for real; /list empty check.

JS objects don't have a length property. Instead of checking for that,
this patch just checks the links array we generate.