Skip to content

apps/space timeAgo helper mutates input and never returns (always undefined) #10377

Done

Description

@h3nr1-d14z

Bug

apps/space/helpers/date-time.helper.ts exports timeAgo() whose body only mutates time in a switch and falls off the end — no return statement, so it returns undefined for every input (number, string, Date).

Evidence (RED, pristine preview)

timeAgo(number) -> undefined
timeAgo(string) -> undefined
timeAgo(object) -> undefined

Impact

Currently latent: rg "timeAgo" apps/space shows zero importers — the caller (comment-detail-card.tsx) already uses the shared, correct calculateTimeAgo from @plane/utils. The local export is dead, broken code that invites future misuse.

Fix

Delete the dead timeAgo export from apps/space/helpers/date-time.helper.ts. packages/utils/src/datetime.ts calculateTimeAgo remains the canonical helper.

Activity

  1. h3nr1-d14z commented on Nov 24, 2026

    @h3nr1-d14z
    Author

    Filed against the wrong fork — the actual fix landed in our standalone org mirror (The1Studio/plane #258/#259, merged). Upstream contribution left open in #10379; the same defect exists upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions