File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
client/packages/lowcoder/src Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ export const searchCustomersSubscriptions = async (Customer: LowcoderSearchCusto
140140 }
141141
142142 // Filter out entries with `"success": "false"`
143- const validEntries = result . data . filter ( ( entry : any ) => entry . success !== "false" ) ;
143+ const validEntries = result . data ? .filter ( ( entry : any ) => entry . success !== "false" ) ;
144144
145145 // Flatten the data arrays and filter out duplicates by `id`
146146 const uniqueSubscriptions = Object . values (
Original file line number Diff line number Diff line change @@ -156,7 +156,8 @@ export default function FormLoginSteps(props: FormLoginProps) {
156156 } , [ serverSettings ] ) ;
157157
158158 const afterLoginSuccess = ( ) => {
159- if ( props . organizationId ) {
159+ // used invitation link or organization login url then set cookie
160+ if ( props . organizationId && ! isEnterpriseMode ) {
160161 localStorage . setItem ( "lowcoder_login_orgId" , props . organizationId ) ;
161162 }
162163 fetchUserAfterAuthSuccess ?.( ) ;
Original file line number Diff line number Diff line change @@ -136,7 +136,8 @@ function UserRegister() {
136136 } , [ serverSettings ] ) ;
137137
138138 const afterLoginSuccess = ( ) => {
139- if ( organizationId ) {
139+ // used invitation link or organization login url then set cookie
140+ if ( organizationId && ! isEnterpriseMode ) {
140141 localStorage . setItem ( "lowcoder_login_orgId" , organizationId ) ;
141142 }
142143 fetchUserAfterAuthSuccess ?.( ) ;
@@ -159,7 +160,7 @@ function UserRegister() {
159160 ) ;
160161
161162 const checkEmailExist = ( ) => {
162- if ( ! Boolean ( account . length ) || lastEmailChecked === account ) return ;
163+ if ( ! Boolean ( account . length ) || lastEmailChecked === account || isEnterpriseMode ) return ;
163164
164165 setOrgLoading ( true ) ;
165166 OrgApi . fetchOrgsByEmail ( account )
You can’t perform that action at this time.
0 commit comments