Fix error when fetching containers upon daemon events

Signed-off-by: Jeffrey Morgan <jmorganca@gmail.com>
This commit is contained in:
Jeffrey Morgan 2015-12-04 13:26:56 -08:00
Родитель f8746f4d66
Коммит 3fc43ec829
1 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -100,14 +100,20 @@ class ContainerStore {
} }
updated ({container}) { updated ({container}) {
if (!container || !container.Name) {
return;
}
let containers = this.containers; let containers = this.containers;
if (containers[container.Name] && containers[container.Name].State.Updating) { if (containers[container.Name] && containers[container.Name].State.Updating) {
return; return;
} }
if (containers[container.Name] && containers[container.Name].Logs) {
container.Logs = containers[container.Name].Logs; container.Logs = containers[container.Name].Logs;
containers[container.Name] = container; }
containers[container.Name] = container;
this.setState({containers}); this.setState({containers});
} }