We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a00c580 commit 13b9bb3Copy full SHA for 13b9bb3
src/utils/format.ts
@@ -12,10 +12,10 @@ export const multiaddrHexToHuman = (hexString: string): string => {
12
return res;
13
};
14
15
-export const taskResultToObject = (results) => {
+export const taskResultToObject = (results?: string | null) => {
16
let resultObj = { storage: 'none' };
17
try {
18
- if (results !== '0x') {
+ if (results && results !== '0x') {
19
resultObj = JSON.parse(
20
Buffer.from(results.substr(2), 'hex').toString('utf8')
21
);
0 commit comments