From c9f3cb4b41d47fa6dbff097f7961c72fafc887e5 Mon Sep 17 00:00:00 2001 From: robin Date: Fri, 2 Jul 2021 17:28:21 +0200 Subject: [PATCH 1/2] v0.28.4 Ref T30324 --- dist/mobx-spine.cjs.js | 4 ++-- dist/mobx-spine.es.js | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/mobx-spine.cjs.js b/dist/mobx-spine.cjs.js index 6597ae2..5307b5d 100644 --- a/dist/mobx-spine.cjs.js +++ b/dist/mobx-spine.cjs.js @@ -1586,7 +1586,7 @@ var Model = (_class$1 = (_temp$1 = _class2$1 = function () { } else { options.params = { validate: true }; } - return this.save(options); + return this.save(options).catch(function () {}); } }, { key: 'save', @@ -1720,7 +1720,7 @@ var Model = (_class$1 = (_temp$1 = _class2$1 = function () { } else { options.params = { validate: true }; } - return this.saveAll(options); + return this.saveAll(options).catch(function () {}); } }, { key: 'saveAll', diff --git a/dist/mobx-spine.es.js b/dist/mobx-spine.es.js index c42e429..de5409f 100644 --- a/dist/mobx-spine.es.js +++ b/dist/mobx-spine.es.js @@ -1580,7 +1580,7 @@ var Model = (_class$1 = (_temp$1 = _class2$1 = function () { } else { options.params = { validate: true }; } - return this.save(options); + return this.save(options).catch(function () {}); } }, { key: 'save', @@ -1714,7 +1714,7 @@ var Model = (_class$1 = (_temp$1 = _class2$1 = function () { } else { options.params = { validate: true }; } - return this.saveAll(options); + return this.saveAll(options).catch(function () {}); } }, { key: 'saveAll', diff --git a/package.json b/package.json index 1a89a68..847a76e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mobx-spine", - "version": "0.28.3", + "version": "0.28.4", "license": "ISC", "author": "Kees Kluskens ", "description": "MobX with support for models, relations and an API.", From d28528870b11e938adcc989fbbf51173e5f59b97 Mon Sep 17 00:00:00 2001 From: robin Date: Fri, 2 Jul 2021 17:31:10 +0200 Subject: [PATCH 2/2] Add catch to validate Ref T30324 --- src/Model.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model.js b/src/Model.js index 4091e3e..200b513 100644 --- a/src/Model.js +++ b/src/Model.js @@ -798,7 +798,7 @@ export default class Model { } else { options.params = { validate: true }; } - return this.save(options); + return this.save(options).catch(() => {}); } @action @@ -911,7 +911,7 @@ export default class Model { } else { options.params = { validate: true }; } - return this.saveAll(options); + return this.saveAll(options).catch(() => {}); } @action