Skip to content

Commit

Permalink
Fix bug in function print
Browse files Browse the repository at this point in the history
  • Loading branch information
stuymedova authored and Sofia Tuimedova committed Nov 27, 2023
1 parent 03d65bd commit 5fcb45d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ export function print(value: any): string {
return value.toString()
}

return typeof value === 'string' ? JSON.stringify(value) : `${value}`
if (value instanceof Object) {
return JSON.stringify(value)
}

return `${value}`
}

/**
Expand Down

0 comments on commit 5fcb45d

Please sign in to comment.