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 dynamicHeight initialization #240

Merged
merged 1 commit into from
Apr 24, 2018

Conversation

justisb
Copy link
Contributor

@justisb justisb commented Apr 24, 2018

Added a couple defensive checks to prevent the error that occurs when getVariableImageHeight is called prior to itemsRef being initialized, which currently happens when the dynamicHeight option is enabled. There's discussion of another solution in #237, but this gets the job done and probably isn't a bad check to have anyway.

Made sure that the relevant story is fixed: http://localhost:9001/?selectedKind=Carousel&selectedStory=dynamic%20height%20images&full=0&down=1&left=1&panelRight=0&downPanel=kadirahq%2Fstorybook-addon-actions%2Factions-panel

@leandrowd leandrowd merged commit caa163f into leandrowd:master Apr 24, 2018
@leandrowd
Copy link
Owner

Thanks for the contribution, this was published to npm as 3.1.37

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.

2 participants