Commit 6f199899 authored by Nicolas Frandeboeuf's avatar Nicolas Frandeboeuf
Browse files

Fix transaction category edition (wrong id type)

parent eaa327e1
......@@ -45,6 +45,18 @@ const CategorySelector = connect(
},
(dispatch, props) => {
return {
onChange(value) {
let categoryId = value;
if (categoryId !== null && typeof categoryId !== 'number') {
categoryId = parseInt(categoryId, 10);
if (isNaN(categoryId)) {
return;
}
}
props.onChange(categoryId);
},
async onCreate(label) {
try {
let category = await actions.createCategory(dispatch, {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment