From 119831e51c2b5d59102893d7c8944656e94980fd Mon Sep 17 00:00:00 2001 From: David Sevilla Martin Date: Wed, 11 Sep 2019 18:14:37 -0400 Subject: [PATCH] Fixes an issue where deleting a nonexistent model would error instead of resolving gracefully --- js/src/common/Model.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/common/Model.js b/js/src/common/Model.js index 03e23662a..1bdb23d0f 100644 --- a/js/src/common/Model.js +++ b/js/src/common/Model.js @@ -190,7 +190,7 @@ export default class Model { * @public */ delete(data, options = {}) { - if (!this.exists) return m.deferred.resolve().promise; + if (!this.exists) return m.deferred().resolve().promise; return app.request(Object.assign({ method: 'DELETE',