Add guard (#582)

This commit is contained in:
Thomas Kaul 2021-12-26 10:07:51 +01:00 committed by GitHub
parent 0043b44670
commit 9d3610331a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -242,7 +242,7 @@ export class DataGatheringService {
try {
currentData[symbol] = await dataEnhancer.enhance({
response,
symbol: symbolMapping[dataEnhancer.getName()] ?? symbol
symbol: symbolMapping?.[dataEnhancer.getName()] ?? symbol
});
} catch (error) {
Logger.error(`Failed to enhance data for symbol ${symbol}`, error);