Handle null or empty on processor
This commit is contained in:
parent
ab647d1f0f
commit
d91292f532
|
@ -108,14 +108,9 @@ interface UserReferenceInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function processOutputBBReference(
|
export async function processOutputBBReference(
|
||||||
value: string,
|
value: string | null | undefined,
|
||||||
subtype: BBReferenceFieldSubType.USER
|
subtype: BBReferenceFieldSubType.USER
|
||||||
): Promise<UserReferenceInfo | undefined> {
|
): Promise<UserReferenceInfo | undefined> {
|
||||||
if (value === null || value === undefined) {
|
|
||||||
// Already processed or nothing to process
|
|
||||||
return value || undefined
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
@ -148,14 +143,12 @@ export async function processOutputBBReference(
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function processOutputBBReferences(
|
export async function processOutputBBReferences(
|
||||||
value: string,
|
value: string | null | undefined,
|
||||||
subtype: BBReferenceFieldSubType
|
subtype: BBReferenceFieldSubType
|
||||||
): Promise<UserReferenceInfo[] | undefined> {
|
): Promise<UserReferenceInfo[] | undefined> {
|
||||||
if (value === null || value === undefined) {
|
if (!value) {
|
||||||
// Already processed or nothing to process
|
return undefined
|
||||||
return value || undefined
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const ids =
|
const ids =
|
||||||
typeof value === "string" ? value.split(",").filter(id => !!id) : value
|
typeof value === "string" ? value.split(",").filter(id => !!id) : value
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue