Ported infograph to JS and prevent exclusion from persisting

Signed-off-by: Sheik Hassan <solergiga@yahoo.com>
No need for the else block since the above returns.