File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ export const AddTenant = () => {
147147 setIsValidationActive ( true ) ;
148148
149149 if ( dateTimeStart !== dateTimeEnd ) {
150- setPropertyErrorText ( dateTimeStart !== dateTimeEnd && propertySelection && propertySelection . length
150+ setPropertyErrorText ( dateTimeStart !== dateTimeEnd && propertySelection . length
151151 ? ""
152152 : "*Property is a required field"
153153 ) ;
@@ -175,7 +175,7 @@ export const AddTenant = () => {
175175 ...values ,
176176 occupants : values . occupants || null ,
177177 unitNum : values . unitNum || null ,
178- propertyID : propertySelection [ 0 ] . key ,
178+ propertyID : propertySelection . length ? propertySelection [ 0 ] . key : null ,
179179 staffIDs : staffSelections && staffSelections . map ( staff => staff . key )
180180 } ;
181181 if ( dateTimeStart !== dateTimeEnd ) {
You can’t perform that action at this time.
0 commit comments