Skip to content

Fix component hash script#1071

Merged
justin808 merged 2 commits intoshakacode:masterfrom
justisb:component-hash-fix
Apr 24, 2018
Merged

Fix component hash script#1071
justin808 merged 2 commits intoshakacode:masterfrom
justisb:component-hash-fix

Conversation

@justisb
Copy link
Copy Markdown
Contributor

@justisb justisb commented Apr 24, 2018

Currently react_component_hash['componentHtml'] does not include the js-react-on-rails-component script tag that initializes React on Rails client-side, due to an invalid string key where a symbol is expected when building the tag internally.

While this specific issue is now fixed in the PR, perhaps some of the hash results could be refactored to use .fetch where a key should always be expected?


This change is Reviewable

@justisb justisb force-pushed the component-hash-fix branch from bb99dd5 to 583e502 Compare April 24, 2018 08:42
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 24, 2018

Coverage Status

Coverage remained the same at ?% when pulling 583e502 on jblasco3:component-hash-fix into 77fc623 on shakacode:master.

@justin808 justin808 merged commit 961ea0c into shakacode:master Apr 24, 2018
@justin808
Copy link
Copy Markdown
Member

@jblasco3 Thanks! I'm releasing 11.0.3 right now.

@justin808
Copy link
Copy Markdown
Member

While this specific issue is now fixed in the PR, perhaps some of the hash results could be refactored to use .fetch where a key should always be expected?

Since this "common rendering" code is used in 2 places, I'm not sure that's necessary. However, I'd like to add a test that fails without this change. Thanks again!

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 this pull request may close these issues.

3 participants