fix rollout nil panice issue

pull/6/head
AdoHe 2016-05-07 10:06:13 -04:00
parent c65a6a431e
commit d1480cd8df
1 changed files with 4 additions and 1 deletions

View File

@ -76,7 +76,10 @@ func (h *DeploymentHistoryViewer) History(namespace, name string) (HistoryInfo,
if err != nil {
return historyInfo, fmt.Errorf("failed to retrieve new replica set from deployment %s: %v", name, err)
}
allRSs := append(allOldRSs, newRS)
allRSs := allOldRSs
if newRS != nil {
allRSs = append(allRSs, newRS)
}
for _, rs := range allRSs {
v, err := deploymentutil.Revision(rs)
if err != nil {