Skip to content

Commit

Permalink
satisfy codacy even though it is wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
rokob committed Jun 15, 2017
1 parent 2425b44 commit b051cea
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sdks/rollbar.js/src/server/transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@ function baseData(item, options, callback) {
callback(null, item);
}

function addBody(item, options, callback) {
if (item.stackInfo) {
addErrorData(item, options, callback);
} else {
addMessageData(item, options, callback);
}
}

function addMessageData(item, options, callback) {
item.data = item.data || {};
item.data.body = item.data.body || {};
Expand All @@ -70,6 +62,14 @@ function addErrorData(item, options, callback) {
callback(null, item);
}

function addBody(item, options, callback) {
if (item.stackInfo) {
addErrorData(item, options, callback);
} else {
addMessageData(item, options, callback);
}
}

function handleItemWithError(item, options, callback) {
if (!item.err) {
callback(null, item);
Expand Down

0 comments on commit b051cea

Please sign in to comment.