Ebola can live outside the body on surfaces for around 12 hours. If he went into the apartment more than 12 hours after Duncan left, he would not have been exposed.
The family was still there