From 66e8f61c1f405633d51dcc3ab2ad25917b09c15c Mon Sep 17 00:00:00 2001 From: Robert Wagner Date: Thu, 30 Sep 2021 21:13:02 -0400 Subject: [PATCH] Optional chaining for projectTag --- addon/services/project-version.js | 2 +- tests/dummy/mirage/config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addon/services/project-version.js b/addon/services/project-version.js index 4dabe7e3e..6b67ccc51 100644 --- a/addon/services/project-version.js +++ b/addon/services/project-version.js @@ -56,7 +56,7 @@ export default Service.extend({ currentVersion = { key: latestVersionName, name: latestVersionName, - tag: config.projectTag, + tag: config?.projectTag, path: '', sha: 'abcde', }; diff --git a/tests/dummy/mirage/config.js b/tests/dummy/mirage/config.js index 9b9a461d8..d93fb1996 100644 --- a/tests/dummy/mirage/config.js +++ b/tests/dummy/mirage/config.js @@ -1,5 +1,5 @@ import config from 'ember-get-config'; -const projectTag = config['ember-cli-addon-docs'].projectTag; +const projectTag = config['ember-cli-addon-docs']?.projectTag; export default function () { this.get('/versions.json', () => {