Skip to content

Commit

Permalink
Merge pull request KelvinTegelaar#2221 from JohnDuprey/dev
Browse files Browse the repository at this point in the history
Add null safe operator to default settings
  • Loading branch information
JohnDuprey authored Mar 15, 2024
2 parents e17aa34 + 8197a11 commit 3697f63
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cipp",
"version": "5.2.1",
"version": "5.3.1",
"description": "The CyberDrain Improved Partner Portal is a portal to help manage administration for Microsoft Partners.",
"homepage": "https://cipp.app/",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion public/version_latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.3.0
5.3.1
2 changes: 1 addition & 1 deletion src/views/identity/administration/AddUser.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ const AddUser = () => {
</CCol>
</CRow>
<>
{currentSettings.userSettingsDefaults.defaultAttributes.map(
{currentSettings?.userSettingsDefaults?.defaultAttributes.map(
(attribute, idx) => (
<CRow key={idx}>
<CCol>
Expand Down
4 changes: 2 additions & 2 deletions src/views/identity/administration/EditUser.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const EditUser = () => {
},
license: precheckedLicenses,
//if currentSettings.defaultAttributes exists. Set each of the keys inside of currentSettings.defaultAttributes.label to the value of the user attribute found in the user object.
defaultAttributes: currentSettings.userSettingsDefaults.defaultAttributes.reduce(
defaultAttributes: currentSettings?.userSettingsDefaults?.defaultAttributes.reduce(
(o, key) => Object.assign(o, { [key.label]: { Value: user[key.label] } }),
{},
),
Expand Down Expand Up @@ -410,7 +410,7 @@ const EditUser = () => {
</CCol>
</CRow>
<>
{currentSettings.userSettingsDefaults.defaultAttributes.map(
{currentSettings?.userSettingsDefaults?.defaultAttributes.map(
(attribute, idx) => (
<CRow key={idx}>
<CCol>
Expand Down
4 changes: 2 additions & 2 deletions src/views/identity/administration/OffboardingWizard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const OffboardingWizard = () => {

return (
<CippWizard
initialValues={currentSettings.userSettingsDefaults}
initialValues={currentSettings?.userSettingsDefaults}
onSubmit={handleSubmit}
wizardTitle="Offboarding Wizard"
>
Expand Down Expand Up @@ -132,7 +132,7 @@ const OffboardingWizard = () => {
<hr className="my-4" />
</CippWizard.Page>
<CippWizard.Page
initialvalues={currentSettings.userSettingsDefaults}
initialvalues={currentSettings?.userSettingsDefaults}
title="Offboarding Settings"
description="Select the offboarding options."
>
Expand Down
4 changes: 2 additions & 2 deletions src/views/tenant/administration/TenantOffboardingWizard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const TenantOffboardingWizard = () => {

return (
<CippWizard
initialValues={currentSettings.userSettingsDefaults}
initialValues={currentSettings?.userSettingsDefaults}
onSubmit={handleSubmit}
wizardTitle="Tenant Offboarding Wizard"
>
Expand All @@ -88,7 +88,7 @@ const TenantOffboardingWizard = () => {
<hr className="my-4" />
</CippWizard.Page>
<CippWizard.Page
initialvalues={currentSettings.tenantuserSettingsDefaults}
initialvalues={currentSettings?.tenantuserSettingsDefaults}
title="Tenant Offboarding Settings"
description="Select the tenant offboarding actions you wish to take."
>
Expand Down
2 changes: 1 addition & 1 deletion version_latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.3.0
5.3.1

0 comments on commit 3697f63

Please sign in to comment.