weareinreach / InReach

Found no return statements in callbacks of array methods JS-0042
Anti-pattern
Major
23 days agoa year old
Array.prototype.map() expects a return value from arrow function
345						label: t(item.attribute.tsKey, { ns: item.attribute.tsNs }),
346						value: item.attribute.id,
347					})
348					return349				}
350				return {
351					label: t(item.attribute.tsKey, { ns: item.attribute.tsNs }),
Array.prototype.map() expects a return value from arrow function
284						label: t(item.attribute.tsKey, { ns: item.attribute.tsNs }),
285						value: item.attribute.id,
286					})
287					return288				}
289
290				return {
Array.prototype.map() expects a value to be returned at the end of arrow function
101																			</Text>
102																			<Text variant={variants.Text.utility4darkGray} pb={12}>
103																				Available at:{' '}
104																				{locations.map((name, i, arr) => {105																					if (arr.length > i + 1)
106																						return `${(<u key={`${id}-${i}`}>{name}</u>)}, `
107																					if (arr.length === i + 1) {
Array.prototype.map() expects a return value from arrow function
173						},
174					}
175				}
176				return177			})
178		)
179		if (updated.length) {
Array.prototype.map() expects a return value from arrow function
156					const originalRecord = data?.results.find(
157						(original) => orgId === original.orgId && locationId === original.locationId
158					)
159					if (!originalRecord) return160
161					return {
162						id: locationId,