From b0d4e263af09ac3ab4a832f57a6ff6cffbe48ea6 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Mon, 9 Aug 2021 20:53:04 -0300 Subject: [PATCH] Fix null check for categories --- src/mappings/metadataHelpers.template.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mappings/metadataHelpers.template.ts b/src/mappings/metadataHelpers.template.ts index 1b0a9f97..998eca5f 100644 --- a/src/mappings/metadataHelpers.template.ts +++ b/src/mappings/metadataHelpers.template.ts @@ -36,7 +36,7 @@ export function fetchSubgraphMetadata(subgraph: Subgraph, ipfsHash: string): Sub subgraph.website = jsonToString(data.get('website')) let categories = data.get('categories') - if(categories != null) { + if(!categories.isNull()) { let categoriesArray = categories.toArray() for(let i = 0; i < categoriesArray.length; i++) {