We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77a61df commit 6fd04d6Copy full SHA for 6fd04d6
1 file changed
packages/types/src/followup.ts
@@ -24,12 +24,12 @@ export interface SuggestionItem {
24
25
export const getSuggestionMode = (mode: unknown): string | undefined => {
26
if (typeof mode === "string" && mode.trim().length > 0) {
27
- return mode
+ return mode.trim()
28
}
29
30
if (mode && typeof mode === "object" && "mode_slug" in mode) {
31
const modeSlug = (mode as { mode_slug?: unknown }).mode_slug
32
- return typeof modeSlug === "string" && modeSlug.trim().length > 0 ? modeSlug : undefined
+ return typeof modeSlug === "string" && modeSlug.trim().length > 0 ? modeSlug.trim() : undefined
33
34
35
return undefined
0 commit comments