Skip to content

Commit

Permalink
Signup: DSS: Remove image preloader when image has loaded
Browse files Browse the repository at this point in the history
Prevents edge case where an image does not change even though the search
changes, causing the `ImagePreloader` to never call its onLoad handler,
resulting in an overlay sticking around forever.
  • Loading branch information
sirbrillig committed Dec 4, 2015
1 parent 44b24b0 commit 1b46020
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/signup/steps/dss/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ export default React.createClass( {
},

renderImageLoader() {
if ( ! this.state.renderComplete ) {
debug( 'preloading image', this.state.dssImage.url );
if ( this.state.renderComplete ) {
return '';
}
debug( 'preloading image', this.state.dssImage.url );
const placeholder = <div></div>;
return (
<ImagePreloader
Expand Down

0 comments on commit 1b46020

Please sign in to comment.