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

Fix: Storybook Docs fail with error "Cannot read properties of undefined (reading 'content')" #317

Closed
andreaforni opened this issue Jan 18, 2024 · 2 comments · Fixed by #318
Assignees

Comments

@andreaforni
Copy link
Contributor

In the deployed Storybook instance, the Docx pages are failing with this error:

Cannot read properties of undefined (reading 'content')
TypeError: Cannot read properties of undefined (reading 'content')
    at https://nearform.github.io/quantum/assets/index-463bac67.js:408:3731
    at handleInterpolation (https://nearform.github.io/quantum/assets/index-463bac67.js:360:2754)
    at serializeStyles (https://nearform.github.io/quantum/assets/index-463bac67.js:365:1292)
    at https://nearform.github.io/quantum/assets/index-463bac67.js:369:972
    at https://nearform.github.io/quantum/assets/index-463bac67.js:365:2381
    at eu (https://nearform.github.io/quantum/assets/index-add592e3.js:22:19476)
    at oo (https://nearform.github.io/quantum/assets/index-add592e3.js:24:1571)
    at ka (https://nearform.github.io/quantum/assets/index-add592e3.js:24:45660)
    at ya (https://nearform.github.io/quantum/assets/index-add592e3.js:24:39496)
    at wf (https://nearform.github.io/quantum/assets/index-add592e3.js:24:39427)

Opening the quantum/assets/index-463bac67.js:408:3731the error is here:

var prism_light_default = SyntaxHighlighter
  , Container$1 = newStyled.div(({theme: t})=>({
    position: "absolute",
    bottom: 0,
    right: 0,
    maxWidth: "100%",
    display: "flex",
    background: t.background.content, // <- HERE!
    zIndex: 1
}))
@andreaforni andreaforni self-assigned this Jan 18, 2024
@andreaforni andreaforni changed the title Fix: Storybook Docx fail with error Fix: Storybook Docx fail with error "Cannot read properties of undefined (reading 'content')" Jan 18, 2024
@simoneb
Copy link
Member

simoneb commented Jan 18, 2024

I've seen this happen before more than a few times (I mean within this same application). Since having this regression continuously doesn't look very good, can we please see if we can put in place something which can detect this issue and fails the build? I'm not sure if it is possible and how much work it would be, but I think it's worth a try

@andreaforni andreaforni changed the title Fix: Storybook Docx fail with error "Cannot read properties of undefined (reading 'content')" Fix: Storybook Docs fail with error "Cannot read properties of undefined (reading 'content')" Jan 18, 2024
Copy link

github-actions bot commented Feb 7, 2024

🎉 This issue has been resolved in version 1.0.0 🎉

The release is available on:

Your optic bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants