我使用redux-saga并创建了一个生成器checkUsername来执行API调用。虽然constusername将等于来自API的响应,但我有undefined。function*checkUsername(action){try{constusername=yieldcall(Api.checkUsername,action.username);yieldput({type:actions.USERNAME_CHECK_SUCCEEDED,username});}catch(e){yieldput({type:actions.USERNAME_CHECK_FAILED,mess