convert input to integer
This commit is contained in:
parent
0d9c3a29c8
commit
1332b7abad
2 changed files with 3 additions and 3 deletions
|
@ -44,7 +44,7 @@ export function decreaseIndentation() {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function updateIndentation() {
|
export function updateIndentation(event) {
|
||||||
const value = event.target.value;
|
const value = event.target.value;
|
||||||
return {
|
return {
|
||||||
type: ActionTypes.UPDATE_INDENTATION,
|
type: ActionTypes.UPDATE_INDENTATION,
|
||||||
|
|
|
@ -27,7 +27,7 @@ const preferences = (state = initialState, action) => {
|
||||||
});
|
});
|
||||||
case ActionTypes.UPDATE_FONTSIZE:
|
case ActionTypes.UPDATE_FONTSIZE:
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
fontSize: action.value
|
fontSize: parseInt(action.value, 10)
|
||||||
});
|
});
|
||||||
case ActionTypes.INCREASE_INDENTATION:
|
case ActionTypes.INCREASE_INDENTATION:
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
|
@ -39,7 +39,7 @@ const preferences = (state = initialState, action) => {
|
||||||
});
|
});
|
||||||
case ActionTypes.UPDATE_INDENTATION:
|
case ActionTypes.UPDATE_INDENTATION:
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
indentationAmount: action.value
|
indentationAmount: parseInt(action.value, 10)
|
||||||
});
|
});
|
||||||
case ActionTypes.INDENT_WITH_TAB:
|
case ActionTypes.INDENT_WITH_TAB:
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
|
|
Loading…
Reference in a new issue