Added multiple rating categories

This commit is contained in:
2017-06-26 11:43:47 +02:00
parent 3ebce24315
commit 61be2fe055
4 changed files with 24 additions and 7 deletions

View File

@ -11,7 +11,11 @@ export function save(arn: AnimeNotifier, input: HTMLInputElement | HTMLTextAreaE
let value = input.value
if(input.type === "number") {
obj[input.id] = parseInt(value)
if(input.getAttribute("step") === "1") {
obj[input.id] = parseInt(value)
} else {
obj[input.id] = parseFloat(value)
}
} else {
obj[input.id] = value
}