1
0
mirror of https://github.com/flarum/core.git synced 2025-05-05 15:07:17 +02:00

Fixes an issue where deleting a nonexistent model would error instead of resolving gracefully

This commit is contained in:
David Sevilla Martin 2019-09-11 18:14:37 -04:00
parent 2aee020c14
commit 119831e51c
No known key found for this signature in database
GPG Key ID: F764F1417E16B15F

View File

@ -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',