diff --git a/contracts/reflect/src/contract.rs b/contracts/reflect/src/contract.rs index f9ebb8b..cf4033c 100644 --- a/contracts/reflect/src/contract.rs +++ b/contracts/reflect/src/contract.rs @@ -74,7 +74,14 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResul pub fn reply(_deps: DepsMut, _env: Env, msg: Reply) -> StdResult { match msg.id { REFLECT_REPLY_ID => { - Ok(Response::default().set_data(msg.result.unwrap().msg_responses[0].clone().value)) + let res = Response::default(); + + let msg_responses = msg.result.unwrap().msg_responses; + if msg_responses.is_empty() { + Ok(res) + } else { + Ok(res.set_data(msg_responses[0].clone().value)) + } } _ => { unimplemented!()