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

"Invalid" Style section metadata prevents pages from rendering #230

Open
bstopp opened this issue Jun 28, 2023 · 0 comments
Open

"Invalid" Style section metadata prevents pages from rendering #230

bstopp opened this issue Jun 28, 2023 · 0 comments
Assignees

Comments

@bstopp
Copy link

bstopp commented Jun 28, 2023

Expected Behaviour

if the author inputs a somewhat invalid section style metadata, it should not prevent the page from rendering.

Author adds the following, should still render:

Section Metadata
Style blue background,

Actual Behaviour

Page fails to render due to an empty class name attempted to be added to the section class list.

lib-franklin.js:350 Uncaught (in promise) DOMException: Failed to execute 'add' on 'DOMTokenList': The token provided must not be empty.
at https://main--troweprice-rf--hlxsites.hlx.page/scripts/lib-franklin.js:350:55
at Array.forEach (<anonymous>)
at https://main--troweprice-rf--hlxsites.hlx.page/scripts/lib-franklin.js:350:18
at Array.forEach (<anonymous>)
at https://main--troweprice-rf--hlxsites.hlx.page/scripts/lib-franklin.js:347:25
at NodeList.forEach (<anonymous>)
at decorateSections (https://main--troweprice-rf--hlxsites.hlx.page/scripts/lib-franklin.js:326:41)
at decorateMain (https://main--troweprice-rf--hlxsites.hlx.page/scripts/scripts.js:56:3)
at loadEager (https://main--troweprice-rf--hlxsites.hlx.page/scripts/scripts.js:69:5)

Can be seen here.

Steps to Reproduce

Edit any page's section metadata, and end the style declaration with a comma (,)

@bstopp bstopp changed the title Invalid "Invalid" Style section metadata prevents pages from rendering Jun 28, 2023
@bstopp bstopp self-assigned this Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant