Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

makeValidDataAttribute error for clients without support for hypernova-id #52

Open
petterm opened this issue Feb 27, 2017 · 0 comments
Open

Comments

@petterm
Copy link

petterm commented Feb 27, 2017

I have an issue with makeValidDataAttribute expecting to always get only defined values.

When I run an application where the hypernova server fails and the hypernova client (hypernova-python in my case) does not include the hypernova-id data attribute the call-chain from load("Component") ends up running from_script with an object like {hypernova-key: "Component", hypernova-id: null}. When that then wants to normalize the attributes it fails on hypernova-id.

By reading the commit that added the functionality of multiple copies of the same component I thought supporting hypernova-id was optional?

Context
Code is transpiled with webpack 2 and babel-loader with presets es2015 and react.

Example html:

<div data-hypernova-key="Component"></div>
<script type="application/json" data-hypernova-key="Component">
        <!--{"someData": "here"}--></script>

Error-code:

Uncaught TypeError: Cannot read property 'replace' of null
  at makeValidDataAttribute
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant