From ce0523eb1c6b9d4755dafc52f5245918c97e53b0 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Tue, 28 Jul 2020 12:17:26 +0200 Subject: [PATCH] Raw toHuman Ascii detection (#2455) --- packages/types/src/codec/Raw.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/types/src/codec/Raw.ts b/packages/types/src/codec/Raw.ts index 74b2fa4ec6..53f128f001 100644 --- a/packages/types/src/codec/Raw.ts +++ b/packages/types/src/codec/Raw.ts @@ -117,7 +117,7 @@ export default class Raw extends Uint8Array implements IU8a { * @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information */ public toHuman (): AnyJson { - return this.isUtf8 + return this.isAscii ? this.toUtf8() : this.toJSON(); }