Update viewer.py

Removing extra if condition.