error on invalid hours argument

master
Yorick van Pelt 2019-06-27 13:21:47 +02:00
부모 d7ae16d715
커밋 46695b8236
로그인 계정: yorick
GPG 키 ID: A36E70F9DC014A15
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제

파일 보기

@ -206,6 +206,9 @@ class App {
async update(sheetname, startDate, endDate, hours) { // set values in sheet
console.log("Setting data in", sheetname)
hours = +hours
if (isNaN(hours)) {
throw "hours argument not a float or int"
}
const values = {
regular: Math.min(hours, 80),
overwork: Math.max(0, hours-80),