From 0b546bba5e35639857098ff34bb95007051234bd Mon Sep 17 00:00:00 2001 From: Yi Zhan Date: Fri, 8 Apr 2022 21:54:48 +0800 Subject: [PATCH] fix: grantTypes undefined err (#654) Signed-off-by: Steve0x2a --- web/src/ApplicationEditPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/ApplicationEditPage.js b/web/src/ApplicationEditPage.js index 0b488fe3..f05018c6 100644 --- a/web/src/ApplicationEditPage.js +++ b/web/src/ApplicationEditPage.js @@ -61,7 +61,7 @@ class ApplicationEditPage extends React.Component { getApplication() { ApplicationBackend.getApplication("admin", this.state.applicationName) .then((application) => { - if (application.grantTypes === null || application.grantTypes.length === 0) { + if (application.grantTypes === null || application.grantTypes === undefined || application.grantTypes.length === 0) { application.grantTypes = ["authorization_code"]; } this.setState({