@xuda.io/xuda-dbs-plugin-xuda 1.0.304 → 1.0.305
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server.js +6 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@xuda.io/xuda-dbs-plugin-xuda",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.305",
|
4
4
|
"description": "Xuda Database Socket for Xuda's proprietary structure powered by CouchDB",
|
5
5
|
"scripts": {
|
6
6
|
"pub": "npm version patch --force && npm publish --access public"
|
package/server.js
CHANGED
@@ -285,7 +285,12 @@ const get_opt = function (e, table_obj) {
|
|
285
285
|
for (const [key, val] of Object.entries(opt.fields)) {
|
286
286
|
opt.fields[key] = "udfData.data." + val;
|
287
287
|
}
|
288
|
-
|
288
|
+
|
289
|
+
const _sort_model =
|
290
|
+
typeof e.sortModel === "string" ? JSON.parse(e.sortModel) : e.sortModel;
|
291
|
+
|
292
|
+
// if (!e?.sortModel || !JSON.parse(e.sortModel).length) {
|
293
|
+
if (!_sort_model.length) {
|
289
294
|
// added 2021 09 10
|
290
295
|
if (opt.sort) {
|
291
296
|
for (const [key, val] of Object.entries(opt.sort)) {
|