From 1332b7abad63204de36329b61b495ffc8d62f1f3 Mon Sep 17 00:00:00 2001 From: mathuramg Date: Wed, 13 Jul 2016 12:59:58 -0400 Subject: [PATCH] convert input to integer --- client/modules/IDE/actions/preferences.js | 2 +- client/modules/IDE/reducers/preferences.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/modules/IDE/actions/preferences.js b/client/modules/IDE/actions/preferences.js index 4a3d0c9c..6314ac7c 100644 --- a/client/modules/IDE/actions/preferences.js +++ b/client/modules/IDE/actions/preferences.js @@ -44,7 +44,7 @@ export function decreaseIndentation() { }; } -export function updateIndentation() { +export function updateIndentation(event) { const value = event.target.value; return { type: ActionTypes.UPDATE_INDENTATION, diff --git a/client/modules/IDE/reducers/preferences.js b/client/modules/IDE/reducers/preferences.js index 0f7b084c..dd5b6073 100644 --- a/client/modules/IDE/reducers/preferences.js +++ b/client/modules/IDE/reducers/preferences.js @@ -27,7 +27,7 @@ const preferences = (state = initialState, action) => { }); case ActionTypes.UPDATE_FONTSIZE: return Object.assign({}, state, { - fontSize: action.value + fontSize: parseInt(action.value, 10) }); case ActionTypes.INCREASE_INDENTATION: return Object.assign({}, state, { @@ -39,7 +39,7 @@ const preferences = (state = initialState, action) => { }); case ActionTypes.UPDATE_INDENTATION: return Object.assign({}, state, { - indentationAmount: action.value + indentationAmount: parseInt(action.value, 10) }); case ActionTypes.INDENT_WITH_TAB: return Object.assign({}, state, {