/*
- *
+ *
* Copyright 2016 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
}
ret.push(html)
}
- return ret.sort(function(a, b){
- return (a.title > b.title) ? -1 : 1;
- });
+ return ret.sort(function(a,b) {
+ var titleA = a.title && a.title.toUpperCase();
+ var titleB = b.title && b.title.toUpperCase();
+ return (titleA < titleB) ? -1 : (titleA > titleB) ? 1 : 0;
+ });
}