redux-form/redux-form

Methods should return consistent data types

Open

#3,931 opened on 2018年3月21日

GitHub で見る
 (1 comment) (7 reactions) (0 assignees)JavaScript (12,592 stars) (1,683 forks)batch import
Version 7bughelp wanted

説明

import {getFormSyncErrors} from 'redux-form/immutable';

...
const errors = getFormSyncErrors(FORM_NAME)(state);

returns object if form has errors or Map if form doesn't have errors
https://github.com/erikras/redux-form/blob/master/src/selectors/getFormSyncErrors.js#L11

special logic is required to check if there are no errors if return is inconsistent if you could, please, fix it 😺 Janna

コントリビューターガイド