Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
pan feng committed Feb 4, 2017
1 parent f72abf1 commit d232da6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions webapp/components/user_settings/custom_theme_chooser.jsx
Expand Up @@ -158,11 +158,12 @@ class CustomThemeChooser extends React.Component {

getColors(text) {
const colorsText = text.split(',');
const exp = new RegExp(`^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$`);
return colorsText.map(colorText => {
let color = colorText.split(': ')[1] || colorText;
if(exp.test(color))
const exp = new RegExp('^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$');
return colorsText.map((colorText) => {
const color = colorText.split(': ')[1] || colorText;
if (exp.test(color)) {
return color;
}
return '#FFF';
});
}
Expand Down Expand Up @@ -197,8 +198,8 @@ class CustomThemeChooser extends React.Component {
this.props.updateTheme(theme);
}

onChangeHandle(e){
//
onChangeHandle(e) {
e.stopPropagation();
}

toggleContent(e) {
Expand Down

0 comments on commit d232da6

Please sign in to comment.