Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
fix: use of tryGetStackInfo() in general
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Kloubert committed Feb 9, 2024
1 parent b671a93 commit ec68db5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egomobile/documentation",
"version": "0.7.1",
"version": "0.7.2",
"description": "Tools for documenting (TypeScript) code.",
"main": "lib/index.js",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion src/decorators/DependsOn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function DependsOn(
const createDependsOnHelpers: CreateDependsOnHelpersFunc = require("../utils/internal").createDependsOnHelpers;
const tryGetStackInfo = require("../utils/internal").tryGetStackInfo;

const stackInfo: Nullable<IStackInfo | false> = tryGetStackInfo(1);
const stackInfo: Nullable<IStackInfo | false> = tryGetStackInfo();

const {
addItem
Expand Down
2 changes: 1 addition & 1 deletion src/utils/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export function isNil(val: unknown): val is (null | undefined) {
return typeof val === "undefined" || val === null;
}

export function tryGetStackInfo(offset = 0): Nullable<IStackInfo | false> {
export function tryGetStackInfo(offset = 1): Nullable<IStackInfo | false> {
try {
const stackTrace = new Error().stack;

Expand Down

0 comments on commit ec68db5

Please sign in to comment.