File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ export class DynamicForm extends React.Component<
260
260
. map ( ( term ) => `-1#;${ term . name } |${ term . key } ;` )
261
261
. join ( "#" ) ;
262
262
} else if ( fieldType === "User" ) {
263
- objects [ `${ columnInternalName } Id` ] = val . newValue ;
263
+ objects [ `${ columnInternalName } Id` ] = val . newValue . length === 0 ? null : val . newValue ;
264
264
} else if ( fieldType === "Choice" ) {
265
265
objects [ columnInternalName ] = val . newValue . key ;
266
266
} else if ( fieldType === "MultiChoice" ) {
@@ -269,7 +269,7 @@ export class DynamicForm extends React.Component<
269
269
objects [ columnInternalName ] = JSON . stringify ( val . newValue ) ;
270
270
} else if ( fieldType === "UserMulti" ) {
271
271
objects [ `${ columnInternalName } Id` ] = {
272
- results : val . newValue . lenght === 0 ? null : val . newValue ,
272
+ results : val . newValue . length === 0 ? null : val . newValue ,
273
273
} ;
274
274
} else if ( fieldType === "Thumbnail" ) {
275
275
if ( additionalData ) {
Original file line number Diff line number Diff line change @@ -610,7 +610,11 @@ export default class SPService implements ISPService {
610
610
const emails = [ ] ;
611
611
result [ fieldName ] . forEach ( element => {
612
612
const loginNameWithoutClaimsToken = element . Name . split ( "|" ) . pop ( ) ;
613
- emails . push ( loginNameWithoutClaimsToken + "/" + element . Title ) ;
613
+ if ( ! loginNameWithoutClaimsToken . toLowerCase ( ) . includes ( 'null' ) ) {
614
+ if ( ! element . Title . toLowerCase ( ) . includes ( 'null' ) ) {
615
+ emails . push ( loginNameWithoutClaimsToken + "/" + element . Title ) ;
616
+ }
617
+ }
614
618
} ) ;
615
619
return emails ;
616
620
}
@@ -634,11 +638,15 @@ export default class SPService implements ISPService {
634
638
if ( result && result [ fieldName ] ) {
635
639
const element = result [ fieldName ]
636
640
const loginNameWithoutClaimsToken = element . Name . split ( "|" ) . pop ( ) ;
637
- return loginNameWithoutClaimsToken + "/" + element . Title ;
641
+ if ( ! loginNameWithoutClaimsToken . toLowerCase ( ) . includes ( 'null' ) ) {
642
+ if ( ! element . Title . toLowerCase ( ) . includes ( 'null' ) ) {
643
+ return loginNameWithoutClaimsToken + "/" + element . Title ;
644
+ }
645
+ }
638
646
}
639
647
}
640
648
641
- return null ;
649
+ return [ ] ;
642
650
} catch ( error ) {
643
651
console . dir ( error ) ;
644
652
return Promise . reject ( error ) ;
You can’t perform that action at this time.
0 commit comments