Skip to content

Commit

Permalink
fix: undefined interpolation on t macro (#1030)
Browse files Browse the repository at this point in the history
  • Loading branch information
semoal authored Apr 8, 2021
1 parent ac07dd2 commit 194f9b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export function interpolate(
}

const result = formatMessage(translation)
return result.trim()
if (typeof result === "string") return result.trim()
return result
}
}

1 comment on commit 194f9b3

@vercel
Copy link

@vercel vercel bot commented on 194f9b3 Apr 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.