Raw/Bytes toHuman() uses utf8 as available (#2431)

* Raw/Bytes toHuman() uses utf8 as available

* Rewrite yarn.lock

* Bump babel
This commit is contained in:
Jaco Greeff
2020-07-15 18:55:50 +02:00
committed by GitHub
parent e4a82f9a1d
commit 991dc48020
13 changed files with 286 additions and 321 deletions
+3 -1
View File
@@ -117,7 +117,9 @@ 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.toJSON();
return this.isUtf8
? this.toUtf8()
: this.toJSON();
}
/**