👕 Fix lint issue

This commit is contained in:
Jan Oberhauser 2022-01-08 11:47:24 +01:00
parent fb6c243edd
commit 6336158d55

View file

@ -209,9 +209,9 @@ export class KafkaTrigger implements INodeType {
} catch (error) { } } catch (error) { }
} }
if (options.returnHeaders) { if (options.returnHeaders && message.headers) {
const headers: {[key: string]: string} = {}; const headers: {[key: string]: string} = {};
for (const key in message.headers) { for (const key of Object.keys(message.headers)) {
const header = message.headers[key]; const header = message.headers[key];
headers[key] = header?.toString('utf8') || ''; headers[key] = header?.toString('utf8') || '';
} }