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? // Do we need to update theme?
const shouldUpdateTheme = const shouldUpdateTheme =
!this.termOptions.theme || !this.termOptions.theme ||
Object.keys(nextTermOptions.theme).some(option => { Object.keys(nextTermOptions.theme).some(
nextTermOptions.theme[option] !== this.termOptions.theme[option]; option => nextTermOptions.theme[option] !== this.termOptions.theme[option]
}); );
if (shouldUpdateTheme) { if (shouldUpdateTheme) {
this.term.setOption('theme', nextTermOptions.theme); this.term.setOption('theme', nextTermOptions.theme);
} }