Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LOG-8039 update packages #59

Merged
merged 18 commits into from Apr 6, 2020

fix empty details

  • Loading branch information
alestrunda committed Apr 3, 2020
commit 32d20ec93c12b06e2e7da95b0d55cb2815d1d2a3
@@ -131,12 +131,13 @@ Loggly.prototype.log = function(meta, callback) {

const splats = data[Symbol.for('splat')];
if (splats && splats.length > 0) {
data.details =
let details =
typeof splats[0] === 'object' ? splats.slice(1, splats.length) : splats; //ignore the first object, it's already included in root
if (splats[0].details !== undefined) {
//overwrites the original details prop, so we need to include it
data.details = [{ details: splats[0].details }, ...data.details];
details = [{ details: splats[0].details }, ...data.details];
}
if (details.length) data.details = details;
}

const self = this;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.