1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-11 18:24:43 +02:00

All: Fixes #1732: Fixed note order when dragging a note outside a notebook

This commit is contained in:
Laurent Cozic 2019-07-21 13:55:25 +01:00
parent 35b6b3fc46
commit 6a42ef50ec

View File

@ -232,8 +232,12 @@ class Note extends BaseItem {
for (let i = 0; i < orders.length; i++) {
const order = orders[i];
if (a[order.by] < b[order.by]) r = +1;
if (a[order.by] > b[order.by]) r = -1;
let aProp = a[order.by];
let bProp = b[order.by];
if (typeof aProp === 'string') aProp = aProp.toLowerCase();
if (typeof bProp === 'string') bProp = bProp.toLowerCase();
if (aProp < bProp) r = +1;
if (aProp > bProp) r = -1;
if (order.dir == 'ASC') r = -r;
if (r !== 0) return r;
}