From c9f93b078545b87286995cc3c56b1a1d32cfd976 Mon Sep 17 00:00:00 2001 From: killer <1533063601@qq.com> Date: Tue, 22 Jun 2021 11:31:53 +0800 Subject: [PATCH] fix: Application null error Signed-off-by: killer <1533063601@qq.com> --- web/src/Setting.js | 2 +- web/src/auth/SignupPage.js | 2 +- web/src/backend/ApplicationBackend.js | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web/src/Setting.js b/web/src/Setting.js index eade2370..30a4bd58 100644 --- a/web/src/Setting.js +++ b/web/src/Setting.js @@ -83,7 +83,7 @@ export function getAllPromptedProviderItems(application) { } export function getSignupItem(application, itemName) { - const signupItems = application.signupItems.filter(signupItem => signupItem.name === itemName); + const signupItems = application.signupItems?.filter(signupItem => signupItem.name === itemName); if (signupItems.length === 0) { return null; } diff --git a/web/src/auth/SignupPage.js b/web/src/auth/SignupPage.js index a3a526c6..cbb1339e 100644 --- a/web/src/auth/SignupPage.js +++ b/web/src/auth/SignupPage.js @@ -402,7 +402,7 @@ class SignupPage extends React.Component { > { - application.signupItems.map(signupItem => this.renderFormItem(application, signupItem)) + application.signupItems?.map(signupItem => this.renderFormItem(application, signupItem)) }