Skip to content

Commit

Permalink
fix: check if at arg is array in out handler
Browse files Browse the repository at this point in the history
  • Loading branch information
f3rno64 committed Feb 6, 2024
1 parent 8bf763f commit b464a97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/commands/out/handler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import parseDate from 'time-speak'
import _isEmpty from 'lodash/isEmpty'
import _isArray from 'lodash/isArray'
import _isFinite from 'lodash/isFinite'
import formatDuration from 'format-duration'
import _isUndefined from 'lodash/isUndefined'
Expand All @@ -19,7 +20,7 @@ const handler = async (args: OutCommandArgs): Promise<void> => {
const endDate =
_isUndefined(at) || _isEmpty(at)
? new Date()
: new Date(+parseDate(at.join(' ')))
: new Date(+parseDate(_isArray(at) ? at.join(' ') : at))

const sheet = db.getActiveSheet()
const { activeEntryID, name: sheetName } = sheet
Expand Down

0 comments on commit b464a97

Please sign in to comment.