fix: survey with empty pin cannot be created (#1361)

This commit is contained in:
Matti Nannt
2023-10-20 19:17:39 +02:00
committed by GitHub
parent d904f223fc
commit 587ea65c88
@@ -108,7 +108,7 @@ export default function SurveyMenuBar({
}
let pin = survey?.pin;
if (!pin || pin.toString().length !== 4) {
if (pin !== null && pin.toString().length !== 4) {
toast.error("PIN must be a four digit number.");
return;
}