error on invalid hours argument

master
Yorick van Pelt 2019-06-27 13:21:47 +02:00
コミット 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),