Fixed #2912, JS error on drawing hidden waterfall