changeset 5d2f72767b41 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset;node=5d2f72767b41
description:
Manage empty direction when updating arrows
Since issue8880, the direction of order may be null.
issue8974
review284691003
diffstat:
src/view/tree.js | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (20 lines):
diff -r 3349aa07caab -r 5d2f72767b41 src/view/tree.js
--- a/src/view/tree.js Thu Jan 09 15:22:43 2020 +0100
+++ b/src/view/tree.js Thu Jan 09 22:35:55 2020 +0100
@@ -288,10 +288,12 @@
if (order && (order.length == 1)) {
name = order[0][0];
direction = order[0][1];
- icon = {
- 'ASC': 'tryton-arrow-down',
- 'DESC': 'tryton-arrow-up',
- }[direction];
+ if (direction) {
+ icon = {
+ 'ASC': 'tryton-arrow-down',
+ 'DESC': 'tryton-arrow-up',
+ }[direction];
+ }
}
this.columns.forEach(function(col) {
var arrow = col.arrow;