From a257ded3cc0984e9b2bbf19c8bacc752bf22cfac Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Sun, 28 Sep 2014 22:15:56 +0400 Subject: [PATCH] Merged countries sort --- app/js/controllers.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/js/controllers.js b/app/js/controllers.js index 46802d3e..4c616dfc 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -2519,10 +2519,11 @@ angular.module('myApp.controllers', ['myApp.i18n']) } } } - $scope.countries.sort(function(a, b) { - return a.name.localeCompare(b.name); - }); - + if (String.prototype.localeCompare) { + $scope.countries.sort(function(a, b) { + return a.name.localeCompare(b.name); + }); + } }); })