Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const rejectAsNeedSelection = (action: Ro.ActionRepresentation | Ro.InvokableActionMember): ErrorWrapper | null => {
if (this.isLocallyContributed(action)) {
if (selected.length === 0) {
const em = new Ro.ErrorMap({}, 0, Msg.noItemsSelected);
const rp = new ErrorWrapper(ErrorCategory.HttpClientError, HttpStatusCode.UnprocessableEntity, em);
return rp;
}
}
return null;
};