Skip to content

Commit

Permalink
Merge pull request #103 from bashlund/fix-86-superprovider-always-fed…
Browse files Browse the repository at this point in the history
…-with-previous-account

Fix #86 - Superprovider always fed with previously selected account
  • Loading branch information
bashlund committed Nov 8, 2019
2 parents 3bdd51d + b6b6f4a commit 7c15465
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -57,10 +57,11 @@ export class Preview extends React.Component<IProps> {

componentDidUpdate(prevProps: IProps) {
const { selectedAccount, htmlToRender } = prevProps;
const { refreshContent } = this.props;

if (selectedAccount.name !== this.props.selectedAccount.name) {
previewService.setAccount(selectedAccount);
this.refreshIframe();
previewService.setAccount(this.props.selectedAccount);
refreshContent();
}

if (htmlToRender !== this.props.htmlToRender) {
Expand Down

0 comments on commit 7c15465

Please sign in to comment.