From d630567c91d01d5b78be84ac1a5e638e4e72516c Mon Sep 17 00:00:00 2001
From: Florian Orben <florian.orben@gmail.com>
Date: Wed, 28 Oct 2015 20:04:22 +0100
Subject: allow code theme to be shareable

---
 web/react/components/user_settings/custom_theme_chooser.jsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'web/react/components/user_settings/custom_theme_chooser.jsx')

diff --git a/web/react/components/user_settings/custom_theme_chooser.jsx b/web/react/components/user_settings/custom_theme_chooser.jsx
index 44b3f4544..095e5b622 100644
--- a/web/react/components/user_settings/custom_theme_chooser.jsx
+++ b/web/react/components/user_settings/custom_theme_chooser.jsx
@@ -40,11 +40,12 @@ export default class CustomThemeChooser extends React.Component {
         const theme = {type: 'custom'};
         let index = 0;
         Constants.THEME_ELEMENTS.forEach((element) => {
-            if (index < colors.length) {
+            if (index < colors.length - 1) {
                 theme[element.id] = colors[index];
             }
             index++;
         });
+        theme.codeTheme = colors[colors.length - 1];
 
         this.props.updateTheme(theme);
     }
@@ -78,6 +79,8 @@ export default class CustomThemeChooser extends React.Component {
             colors += theme[element.id] + ',';
         });
 
+        colors += theme.codeTheme;
+
         const pasteBox = (
             <div className='col-sm-12'>
                 <label className='custom-label'>
-- 
cgit v1.2.3-1-g7c22

