Skip to content

Commit

Permalink
fix(renderer): fix window title update
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed May 4, 2017
1 parent d0727f8 commit 8612d0d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ export default class ElectronWindowTitle extends React.Component {
children: React.PropTypes.string.isRequired
};

shouldComponentUpdate(nextProps) {
return this.props.children !== nextProps.children;
}

componentDidMount() {
const currentWindow = remote.getCurrentWindow();
currentWindow.setTitle(this.getTitle());
Expand Down

0 comments on commit 8612d0d

Please sign in to comment.