fix js error

Fix JS error caused by imgUrl being undefined.