Fixes router.navigate()

Corrected inverted condition on navigate function