adminforth 1.3.29 → 1.3.30

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/dist/index.js CHANGED
@@ -249,8 +249,11 @@ class AdminForth {
249
249
  if (!resp || (!resp.ok && !resp.error)) {
250
250
  throw new Error(`Hook afterSave must return object with {ok: true} or { error: 'Error' } `);
251
251
  }
252
- return { error: resp.error };
252
+ if (resp.error) {
253
+ return { error: resp.error };
254
+ }
253
255
  }
256
+ return { error: null };
254
257
  });
255
258
  }
256
259
  deleteResourceRecord(_b) {
package/index.ts CHANGED
@@ -321,9 +321,12 @@ class AdminForth implements IAdminForth {
321
321
  if (!resp || (!resp.ok && !resp.error)) {
322
322
  throw new Error(`Hook afterSave must return object with {ok: true} or { error: 'Error' } `);
323
323
  }
324
-
325
- return { error: resp.error };
324
+ if (resp.error) {
325
+ return { error: resp.error };
326
+ }
326
327
  }
328
+
329
+ return { error: null };
327
330
  }
328
331
 
329
332
  async deleteResourceRecord(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "1.3.29",
3
+ "version": "1.3.30",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",