mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-05 05:50:19 +08:00
fix: remove "Agreement" in edit application error (#1506)
This commit is contained in:
@ -520,10 +520,10 @@ export function getTermsOfUseContent(url, setTermsOfUseContent) {
|
|||||||
export function isAgreementRequired(application) {
|
export function isAgreementRequired(application) {
|
||||||
if (application) {
|
if (application) {
|
||||||
const agreementItem = application.signupItems.find(item => item.name === "Agreement");
|
const agreementItem = application.signupItems.find(item => item.name === "Agreement");
|
||||||
if (agreementItem.rule === "None" || !agreementItem.rule) {
|
if (!agreementItem || agreementItem.rule === "None" || !agreementItem.rule) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (agreementItem && agreementItem.required) {
|
if (agreementItem.required) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user