Fix Term theme hot reloading (#2771)

This commit is contained in:
CHaBou 2018-03-22 20:59:07 +01:00 committed by GitHub
parent f6a1ba114a
commit 984922d046
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -240,9 +240,9 @@ export default class Term extends React.PureComponent {
// Do we need to update theme?
const shouldUpdateTheme =
!this.termOptions.theme ||
Object.keys(nextTermOptions.theme).some(option => {
nextTermOptions.theme[option] !== this.termOptions.theme[option];
});
Object.keys(nextTermOptions.theme).some(
option => nextTermOptions.theme[option] !== this.termOptions.theme[option]
);
if (shouldUpdateTheme) {
this.term.setOption('theme', nextTermOptions.theme);
}