[content] Fix build fail error related to non string styles params#492
Open
MenKNas wants to merge 6 commits into
Open
[content] Fix build fail error related to non string styles params#492MenKNas wants to merge 6 commits into
MenKNas wants to merge 6 commits into
Conversation
🦋 Changeset detectedLatest commit: 7375070 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
📦 Package Size and Test Coverage Report
|
illiakovalenko
requested changes
Jun 3, 2026
Collaborator
There was a problem hiding this comment.
I think we’re missing a couple of scenarios here, which could introduce bugs. It would be good to test these cases locally as well.
- There is a scenario where
stylescan be provided as an object, but its value (Styles.value) is currently ignored. If this is part of the defined contract, we should validate and properly handle the value; otherwise customers will not be able to apply styles as expected.
- I assigned a
stylesid to the component in Pages Editor and also added additional styles via the right-hand side panel (e.g. alignment, classname). In this case, we receive a merged JSON including thestylesid, which is incorrect and should be addressed - likely by a different team - likely it should be done before our release, otherwise customers will report a new item, please create an item / test and track it. Currently we just set a huge string as a class.
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description / Motivation
This PR provides a solution fix for a prerender build crash caused by calling .match() on non-string rendering params when
DetailedRenderingParamsreturns objects.This is done by introducing a small
asStringguard in themes traversal so regex logic runs only on real strings, while non-string values are safely ignored and existing fallback behaviour remains intact.Testing Details
Types of changes