@xuda.io/xuda-dbs-plugin-xuda 1.0.48 → 1.0.49

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-dbs-plugin-xuda",
3
- "version": "1.0.48",
3
+ "version": "1.0.49",
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
@@ -1656,8 +1656,9 @@ exports.update = async (params, setup_doc, resolve, reject) => {
1656
1656
  const doc = await db.get(e.row_id, {});
1657
1657
  let data = doc.udfData.data;
1658
1658
  var error;
1659
- if (!e.field_id && e.data) {
1659
+ if (!e.field_id && !e.data) {
1660
1660
  error = "Invalid field_id or data object to save";
1661
+ return reject(error);
1661
1662
  }
1662
1663
  // single value save
1663
1664
  if (e.field_id) {