Skip to content

Commit

Permalink
Don't re-assign logSettings.propertiesToInstrument
Browse files Browse the repository at this point in the history
  • Loading branch information
birdsarah committed May 19, 2020
1 parent ab6d3ce commit 87ccdab
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -675,10 +675,10 @@ export function getInstrumentJS(event_id: number, sendMessagesToLogger) {
// Set propertiesToInstrument to null to force no properties to be instrumented.
// (this is used in testing for example)
if (logSettings.propertiesToInstrument !== null) {
if (logSettings.propertiesToInstrument.length === 0) {
logSettings.propertiesToInstrument = Object.getPropertyNames(object);
}
for (const propertyName of logSettings.propertiesToInstrument) {
const properties = logSettings.propertiesToInstrument
? logSettings.propertiesToInstrument
: Object.getOwnPropertyNames(object);
for (const propertyName of properties) {
if (logSettings.excludedProperties.includes(propertyName)) {
continue;
}
Expand Down

0 comments on commit 87ccdab

Please sign in to comment.