Skip to content

Commit

Permalink
Merge pull request #10 from bruno-sartori/HOTFIX-1_forget_to_import_f…
Browse files Browse the repository at this point in the history
…kin_module

fix(stacktrace.js): forgot to import stacktrace.js... don't look at me
  • Loading branch information
bruno-sartori authored Aug 31, 2024
2 parents 00e551c + d795d4a commit 4636cd6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Binary file modified docs/logger-on-web-project.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bsartori/weeb-logger",
"version": "2.0.4",
"version": "2.0.5",
"author": "Bruno Sartori <[email protected]>",
"license": "MIT",
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { BORDER_RADIUS, SCROLLBAR_WIDTH, WAIFU_SIZE, WAIFU_THEME } from './const
import WeebLoggerCanvasHandler from './CanvasHandler'
import { IWeebLog, IWeebLoggerConfig } from './interfaces';
import { IWeebRequiredLoggerConfig, LogType } from './types';
import StackTraceJS from 'stacktrace-js';

const isNode = typeof process === 'object' && `${process}` === '[object process]';

Expand Down Expand Up @@ -341,7 +342,7 @@ class WeebLogger {
if (formattedMessage instanceof Error) {
if (this.config.formatStackTrace) {
try {
formattedMessage = formatErrorWithStackTrace(formattedMessage.message, await StackTrace.fromError(formattedMessage));
formattedMessage = formatErrorWithStackTrace(formattedMessage.message, await StackTraceJS.fromError(formattedMessage));
} catch {
formattedMessage = (formattedMessage as Error).stack ?? (formattedMessage as Error).message;
}
Expand Down

0 comments on commit 4636cd6

Please sign in to comment.