diff --git a/service/history/historyEngine.go b/service/history/historyEngine.go index a851612691e..5e83e904986 100644 --- a/service/history/historyEngine.go +++ b/service/history/historyEngine.go @@ -1405,10 +1405,12 @@ func (e *historyEngineImpl) DescribeMutableState( response = &h.DescribeMutableStateResponse{} - if msb := cacheCtx.GetWorkflowExecution(); cacheHit && msb != nil { - response.MutableStateInCache, err = e.toMutableStateJSON(msb) - if err != nil { - return nil, err + if cacheHit { + if msb := cacheCtx.GetWorkflowExecution(); msb != nil { + response.MutableStateInCache, err = e.toMutableStateJSON(msb) + if err != nil { + return nil, err + } } }