do not call getParentRouter unless contextual
do not call getParentRouter unless contextual

This avoids an infinite loop if the parent router environment does not match the current router. (esp if the router is not marked as contextual)
This also saves a method call.
srph/react-router-component,STRML/react-router-component,srph/react-router-component,modulexcite/react-router-component,jsg2021/react-router-component,migolo/react-router-component