From b44fd1d4d519cd2439c5fb6efdf5c5cf6cad25ad Mon Sep 17 00:00:00 2001 From: snewcomer Date: Fri, 19 Feb 2021 21:10:45 -0600 Subject: [PATCH] add computeds --- packages/model/addon/-private/model.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/model/addon/-private/model.js b/packages/model/addon/-private/model.js index 4ced63d02fd..4a8548b0dbe 100644 --- a/packages/model/addon/-private/model.js +++ b/packages/model/addon/-private/model.js @@ -400,6 +400,7 @@ class Model extends EmberObject.extend(DeprecatedEvented) { @type {Boolean} @readOnly */ + @computed() get isError() { if (REQUEST_SERVICE) { let errorReq = this._errorRequests[this._errorRequests.length - 1]; @@ -442,6 +443,7 @@ class Model extends EmberObject.extend(DeprecatedEvented) { @type {Boolean} @readOnly */ + @computed() get isReloading() { let meta = getRecordMeta(this); let isReloading = get(meta, 'isReloading'); @@ -763,7 +765,7 @@ class Model extends EmberObject.extend(DeprecatedEvented) { this.model.destroyRecord().then(function() { this.transitionToRoute('model.index'); }); - } + } } ```