From 2247dd3471c07288a51f1ed8e7fd6342c4f8a91e Mon Sep 17 00:00:00 2001 From: Thijs Wenker Date: Wed, 6 Feb 2019 18:24:40 +0100 Subject: [PATCH] local compare in entity list sorting --- scripts/system/html/js/entityList.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/system/html/js/entityList.js b/scripts/system/html/js/entityList.js index f059b91e81..b19873a049 100644 --- a/scripts/system/html/js/entityList.js +++ b/scripts/system/html/js/entityList.js @@ -681,6 +681,9 @@ function loaded() { if (isNullOrEmpty(valueB)) { return (isDefaultSort ? -1 : 1) * (isAscendingSort ? 1 : -1); } + if (typeof(valueA) === "string") { + return valueA.localeCompare(valueB); + } return valueA < valueB ? -1 : 1; }); });