Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function toastErrors({ err }: UnsafeError) {
return error(prettyPrintApiErrors(err));
}
export function toastErrors({ err }: UnsafeError) {
return error(prettyPrintApiErrors(err));
}
onClick={() => props.plantPointerCount > 0
? error(t("Please clear current garden first. ({{plantCount}} plants)",
{ plantCount: props.plantPointerCount }))
: props.dispatch(applyGarden(props.gardenId))}>
{t("apply")}
.catch(function (e) {
error(t("Some weeds failed to delete. Please try again."));
prog.finish();
});
} catch (e) {
maybeSave = () => {
const pinNums = this.props.sensors.map(x => x.body.pin);
const allAreUniq = uniq(pinNums).length === pinNums.length;
if (allAreUniq) {
this.props.dispatch(saveAll(this.props.sensors, this.toggle));
} else {
error(t("Pin numbers must be unique."));
}
}