Skip to content

Commit 8a979de

Browse files
committed
Update SettingsCustomRoles.jsx
1 parent af8202c commit 8a979de

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/views/cipp/app-settings/components/SettingsCustomRoles.jsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,30 +128,31 @@ const SettingsCustomRoles = () => {
128128
} else {
129129
if (set === 'AllowedTenants') {
130130
setSelectedTenant(customRole[0][set])
131-
var selectedTenants = []
131+
var selectedTenantList = []
132132
tenants.map((tenant) => {
133133
if (customRole[0][set].includes(tenant.customerId)) {
134-
selectedTenants.push({
134+
selectedTenantList.push({
135135
label: tenant.displayName,
136136
value: tenant.customerId,
137137
})
138138
}
139139
})
140140

141-
tenantSelectorRef.current.setValue(selectedTenants)
141+
tenantSelectorRef.current.setValue(selectedTenantList)
142142
} else if (set === 'BlockedTenants') {
143143
setBlockedTenants(customRole[0][set])
144-
var blockedTenants = []
144+
var blockedTenantList = []
145145
tenants.map((tenant) => {
146146
if (customRole[0][set].includes(tenant.customerId)) {
147-
blockedTenants.push({
147+
blockedTenantList.push({
148148
label: tenant.displayName,
149149
value: tenant.customerId,
150150
})
151151
}
152152
})
153-
154-
blockedTenantSelectorRef.current.setValue(blockedTenants)
153+
if (blockedTenantSelectorRef?.current) {
154+
blockedTenantSelectorRef.current.setValue(blockedTenantList)
155+
}
155156
} else {
156157
onChange(customRole[0][set])
157158
}

0 commit comments

Comments
 (0)