mirror of
https://github.com/fluencelabs/examples
synced 2024-12-04 19:20:17 +00:00
better check for undefined
This commit is contained in:
parent
cbe7daadca
commit
824f9a89fe
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user