1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-27 07:42:27 +01:00

"can't convert undefined to object" my arse. Hrmph.

This commit is contained in:
Kris Maglione
2014-07-11 01:36:33 -07:00
parent 085ad7c7ef
commit 412da77667

View File

@@ -1093,7 +1093,8 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
function compare(a, b) {
if (!isNaN(a[0]) && !isNaN(b[0]))
return a[0] - b[0];
return String.localeCompare(a[0], b[0]);
return String.localeCompare(String(a[0]),
String(b[0]));
}
let vals = template.map(keys.sort(compare), f => f[1],