Skip to content
New issue

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

RenderHandler breaks render when context is missing #14

Closed
eudaimos opened this issue Aug 10, 2019 · 1 comment
Closed

RenderHandler breaks render when context is missing #14

eudaimos opened this issue Aug 10, 2019 · 1 comment
Labels
bug Something isn't working pkg: react corresponds to the @tao.js/react package

Comments

@eudaimos
Copy link
Contributor

If RenderHandler has a context set that isn't available by name in the surrounding provider (there was no DataHandler with the given name) then rendering is broken.

the offending line is:

function recursiveContextGenerator(
  
) {
  const ctxName = ctxList[ctxIdx];
 const context = getContext(ctxName);
  
}

leads to trying to make a <context.Consumer> which can't get Consumer of undefined

Solution: check for context missing after getContext(ctxName) call and handle it

@eudaimos eudaimos added bug Something isn't working pkg: react corresponds to the @tao.js/react package labels Aug 10, 2019
@eudaimos
Copy link
Contributor Author

eudaimos commented Feb 7, 2022

fixed by c5556ed

@eudaimos eudaimos closed this as completed Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg: react corresponds to the @tao.js/react package
Projects
None yet
Development

No branches or pull requests

1 participant