Raw toHuman Ascii detection (#2455)

This commit is contained in:
Jaco Greeff
2020-07-28 12:17:26 +02:00
committed by GitHub
parent eb0370bb66
commit ce0523eb1c
+1 -1
View File
@@ -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();
}