Skip to content

Commit

Permalink
feat(v-text/v-html): Add the ability to render custom toString()
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieutu committed May 22, 2018
1 parent f29d338 commit 13e7af3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function isValidArrayIndex (val: any): boolean {
export function toString (val: any): string {
return val == null
? ''
: typeof val === 'object'
: typeof val === 'object' && (!isPlainObject(val) || val.toString() === _toString.call(val))
? JSON.stringify(val, null, 2)
: String(val)
}
Expand Down

0 comments on commit 13e7af3

Please sign in to comment.