ming_node 2.9.3 → 2.9.5
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +1 -1
- package/module/FileDb.js +10 -2
- package/package.json +1 -1
package/index.js
CHANGED
package/module/FileDb.js
CHANGED
@@ -100,9 +100,17 @@ class FileDb{
|
|
100
100
|
let orderType=orderArr[1];
|
101
101
|
rows.sort((a,b)=>{
|
102
102
|
let ret=0;
|
103
|
-
|
103
|
+
let a_order_v=0;
|
104
|
+
let b_order_v=0;
|
105
|
+
if(a[orderField]!=null){
|
106
|
+
a_order_v=a[orderField];
|
107
|
+
}
|
108
|
+
if(b[orderField]!=null){
|
109
|
+
b_order_v=b[orderField];
|
110
|
+
}
|
111
|
+
if (a_order_v>b_order_v) {
|
104
112
|
ret= 1;
|
105
|
-
}else if(
|
113
|
+
}else if(a_order_v<b_order_v){
|
106
114
|
ret= -1
|
107
115
|
}else{
|
108
116
|
ret= 0;
|
package/package.json
CHANGED