if (sortbottomrows) {
should be
if (sortbottomrows.length!=0) {
I never remember that empty lists are not false. http://twitter.com/sil/status/1098309683
Back to the sorttable bug list