radiovisual / timecard

Keep track of your project development time.
MIT License
20 stars 4 forks source link

timecard print throws an error if executed before clockout #24

Closed Jeemusu closed 8 years ago

Jeemusu commented 8 years ago

I sometimes need to print my timecard while still clocked in, doing so throws the following error:

Error: Invalid parameters passed to pendel
    at module.exports (/usr/local/lib/node_modules/timecard/node_modules/pendel/index.js:8:15)
    at TimeCard.prettyPrintEntry (/usr/local/lib/node_modules/timecard/dist/messages.js:99:53)
    at /usr/local/lib/node_modules/timecard/dist/index.js:273:27
    at Array.map (native)
    at TimeCard.callee$2$0$ (/usr/local/lib/node_modules/timecard/dist/index.js:272:36)
    at tryCatch (/usr/local/lib/node_modules/timecard/node_modules/babel-runtime/regenerator/runtime.js:72:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/timecard/node_modules/babel-runtime/regenerator/runtime.js:334:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/timecard/node_modules/babel-runtime/regenerator/runtime.js:105:21)
    at tryCatch (/usr/local/lib/node_modules/timecard/node_modules/babel-runtime/regenerator/runtime.js:72:40)
    at invoke (/usr/local/lib/node_modules/timecard/node_modules/babel-runtime/regenerator/runtime.js:146:20)
radiovisual commented 8 years ago

Ah. Nice catch. I will work on this today.

radiovisual commented 8 years ago

So now you can print your timecards even with a pending clockout:

image

Thanks for reporting the issue!