Skip to content

Commit e37c2a1

Browse files
Finalized the simplified function, added missing return statements
1 parent 486d79e commit e37c2a1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

azure/activity_logs_monitoring/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,12 +396,15 @@ class EventhubLogHandler {
396396
// If the check is true, find and replace single quotes
397397
// with double quotes, to make a proper JSON
398398
// which is then converted into a JSON Object
399-
parsedProperties = JSON.parse(record.properties.replace(/'/g, '"'));
400-
record.properties = parsedProperties;
399+
record.properties = JSON.parse(record.properties.replace(/'/g, '"'));
400+
return record;
401401
} catch {
402402
this.context.error('Unable to fix properties field to JSON Object');
403+
return record;
403404
}
404-
return record;
405+
} else {
406+
return record;
407+
}
405408
}
406409

407410
handleLogs(logs) {

0 commit comments

Comments
 (0)