We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi.
I'm trying to wrap <LiquidRoute> in a custom component to handle authorisation:
<LiquidRoute>
<Router> <AuthRoute> <LiquidRoute animator={FadeAnimation} path="/test" component={Test} /> </AuthRoute> </Router>
AuthRoute looks like this:
AuthRoute
import { h, Component } from "preact" import { route } from "preact-router" import { STORAGE_USER } from "../conf.js" class AuthRoute extends Component { constructor() { super() } componentWillMount() { if (! localStorage.getItem(STORAGE_USER)) { route("/") } } render(props) { return ( <div>{props.children}</div> ) } } export default AuthRoute
This results in the following error in Firefox:
TypeError: vnode.attributes is undefined rankChild webpack-internal:///./node_modules/preact-router/dist/preact-router.es.js:86:2 prepareVNodeForRanking webpack-internal:///./node_modules/preact-router/dist/preact-router.es.js:69:15 filter self-hosted:318:17 getMatchingChildren webpack-internal:///./node_modules/preact-router/dist/preact-router.es.js:315:10 render webpack-internal:///./node_modules/preact-router/dist/preact-router.es.js:335:16 renderComponent webpack-internal:///./node_modules/preact/dist/preact.mjs:526:14 renderComponent webpack-internal:///./node_modules/preact/dist/preact.mjs:554:5 setComponentProps webpack-internal:///./node_modules/preact/dist/preact.mjs:475:4 buildComponentFromVNode webpack-internal:///./node_modules/preact/dist/preact.mjs:641:3 idiff webpack-internal:///./node_modules/preact/dist/preact.mjs:252:10 diff webpack-internal:///./node_modules/preact/dist/preact.mjs:213:12 render webpack-internal:///./node_modules/preact/dist/preact.mjs:708:10 <anonymous> webpack-internal:///./src/index.js:123:2 ./src/index.js <snipped>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi.
I'm trying to wrap
<LiquidRoute>
in a custom component to handle authorisation:AuthRoute
looks like this:This results in the following error in Firefox:
The text was updated successfully, but these errors were encountered: