Merge pull request #1997 from omarelanis/master

Fix initial blank load
This commit is contained in:
Hugo Bernier 2021-08-04 09:51:10 -04:00 committed by GitHub
commit 4ea97e510d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ export default class HeroWebpart extends React.Component<IHeroWebpartProps, IHer
public componentDidUpdate(prevProps : IHeroWebpartProps, prevState : IHeroState) : void
{
// If properties have changed bind it and update webpart
if(this.props.items !== prevProps.items)
if(this.props.items !== prevProps.items && this.props.items.length!==0)
{
this.setState({items:this.props.items});
if(this.props.showAllHero){