From 998df395603b324447fa5a74143a5a9cae9bed58 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 30 May 2023 10:37:35 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20scopeModel=20should=20che?= =?UTF-8?q?ck=20for=20ID=20before=20calling=20peekRecord=20(#298)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/addon/models/base.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/api/addon/models/base.js b/addons/api/addon/models/base.js index 6ba189d5e..3084f7bf4 100644 --- a/addons/api/addon/models/base.js +++ b/addons/api/addon/models/base.js @@ -57,7 +57,7 @@ export default class BaseModel extends Model { get scopeModel() { const id = this.scopeID; - return this.store.peekRecord('scope', id); + return id ? this.store.peekRecord('scope', id) : null; } // Ember seems to have a bug with its internals and can't correctly set