Avoid null values when parsing input

old
Javi Velasco 2016-05-26 21:38:02 +02:00
parent a9e8304a84
commit 310d683fa9
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ export default {
prepareValueForInput (value, type) {
if (type === 'date') return new Date(value).toISOString().slice(0, 10);
if (type === 'checkbox') {
return value ? 'on' : null;
return value ? 'on' : '';
}
return value;
}