From 75ed13016c62326bbc5a73d9ca90b25a2ea0cf00 Mon Sep 17 00:00:00 2001 From: Johannes Hund Date: Tue, 28 May 2019 14:58:03 +0200 Subject: [PATCH] fixing a crash when using client with security --- packages/core/src/consumed-thing.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/consumed-thing.ts b/packages/core/src/consumed-thing.ts index ab44e44e3..95e744acc 100644 --- a/packages/core/src/consumed-thing.ts +++ b/packages/core/src/consumed-thing.ts @@ -116,7 +116,7 @@ export default class ConsumedThing extends TD.Thing implements WoT.ConsumedThing if (this.security && this.securityDefinitions && Array.isArray(this.security) && this.security.length>0) { console.log(`ConsumedThing '${this.title}' setting credentials for ${client}`); - let scs : Array; + let scs : Array = []; for(let s of this.security) { let ws = this.securityDefinitions[s + ""]; // String vs. string (fix wot-typescript-definitions?) if(ws && ws.scheme !== "nosec") {