Dla (... in ...) instrukcje należy filtrować za pomocą instrukcji IF (forin)
for (const errorName in state.errors) {
if (state.errors.hasOwnProperty(errorName)) {
switch (errorName) {
wolf354