fix JS error when there is no photos on the drive