Skip to content

Commit

Permalink
fix: resolve stack trace
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Oct 25, 2018
1 parent 1faa328 commit bd7e13a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"array-flatten": "^2.1.1",
"boolean": "^0.2.0",
"es6-error": "^4.1.1",
"get-stack-trace": "^2.0.0",
"get-stack-trace": "^2.0.1",
"pg": "^7.5.0",
"pg-connection-string": "^2.0.0",
"pretty-hrtime": "^1.0.3",
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ export const query: InternalQueryFunctionType<*> = async (connection, clientConf
let stackTrace;

if (SLONIK_LOG_STACK_TRACE) {
const callSites = getStackTrace();
const callSites = await getStackTrace();

stackTrace = callSites
.map((callSite) => {
return callSite.fileName + ':' + callSite.lineNumber + ':' + callSite.columnNumber;
return (callSite.fileName || '') + ':' + callSite.lineNumber + ':' + callSite.columnNumber;
});
}

Expand Down

0 comments on commit bd7e13a

Please sign in to comment.