fix(RoleEditPage): Fix a crash when the sample role domains is null (#1268)

This commit is contained in:
Dinn 2022-11-13 12:28:24 +08:00 committed by GitHub
parent 61c2fd5412
commit 262aeba7e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,7 +173,7 @@ class RoleEditPage extends React.Component {
this.updateRoleField("domains", value);
})}>
{
this.state.role.domains.map((domain, index) => <Option key={index} value={domain}>{domain}</Option>)
this.state.role.domains?.map((domain, index) => <Option key={index} value={domain}>{domain}</Option>)
}
</Select>
</Col>