From 824f9a89fec622c4ffa07f92532ee1e3a49e77a9 Mon Sep 17 00:00:00 2001 From: Pavel Murygin Date: Tue, 5 Jul 2022 23:19:53 +0300 Subject: [PATCH] better check for undefined --- aqua-examples/aqua-ipfs-integration/nodejs/src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aqua-examples/aqua-ipfs-integration/nodejs/src/main.ts b/aqua-examples/aqua-ipfs-integration/nodejs/src/main.ts index ec2ac2b..b81954c 100644 --- a/aqua-examples/aqua-ipfs-integration/nodejs/src/main.ts +++ b/aqua-examples/aqua-ipfs-integration/nodejs/src/main.ts @@ -34,7 +34,7 @@ export async function main(environment: Node[]) { console.log('📘 uploading .wasm to node %s', providerHost.multiaddr); const firstThing = await globSource('../service/artifacts/', 'process_files.wasm').next(); const fileCandidate = await firstThing.value - if(typeof fileCandidate === 'undefined') { + if(fileCandidate === undefined) { throw new Error("Couldn't read process_files.wasm"); } let { file, swarmAddr, rpcAddr } = await provideFile(fileCandidate, providerClient);