From af96239b9addaa63eab389b4cf6f085c5a946fb5 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Fri, 24 Nov 2017 12:07:21 +0100 Subject: [PATCH] Fixed sorting --- openslides/core/static/js/core/base.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openslides/core/static/js/core/base.js b/openslides/core/static/js/core/base.js index 3000903c0..5ae46342e 100644 --- a/openslides/core/static/js/core/base.js +++ b/openslides/core/static/js/core/base.js @@ -1447,12 +1447,13 @@ angular.module('OpenSlidesApp.core', [ // Wraps the orderBy filter. But puts ("", null, undefined) last. .filter('orderByEmptyLast', [ '$filter', - function ($filter) { + '$parse', + function ($filter, $parse) { return function (array, sortPredicate, reverseOrder, compareFn) { + var parsed = $parse(sortPredicate); var falsyItems = []; var truthyItems = _.filter(array, function (item) { - var falsy = item[sortPredicate] === void 0 || - item[sortPredicate] === null || item[sortPredicate] === ''; + var falsy = parsed(item) === void 0 || parsed(item) === null || parsed(item) === ''; if (falsy) { falsyItems.push(item); }