Skip to content

Commit

Permalink
breadcrumbsNumber: 0 - 25
Browse files Browse the repository at this point in the history
  • Loading branch information
ZsharE committed Jan 12, 2022
1 parent 79ec577 commit 03bb6f6
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions dist/elmahio.js

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

2 changes: 1 addition & 1 deletion dist/elmahio.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/elmahio.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/elmahio.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion elmah.io.javascript.nuspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<version>3.5.4</version>
<version>3.6.0</version>
<authors>elmah.io</authors>
<owners>elmah.io</owners>
<id>elmah.io.javascript</id>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "elmah.io.javascript",
"description": "elmah.io javascript logger.",
"version": "3.5.4",
"version": "3.6.0",
"repository": "https://github.com/elmahio/elmah.io.javascript",
"license": "Apache-2.0",
"main": "dist/elmahio.js",
Expand Down
8 changes: 4 additions & 4 deletions src/elmahio.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* elmah.io Javascript Logger - version 3.5.4
* elmah.io Javascript Logger - version 3.6.0
* (c) 2018 elmah.io, Apache 2.0 License, https://elmah.io
*/

Expand Down Expand Up @@ -1116,15 +1116,15 @@

breadcrumbs.push(crumb);

if(options.breadcrumbsNumber && typeof options.breadcrumbsNumber === "number" ) {
if(options.breadcrumbsNumber >= 0 && typeof options.breadcrumbsNumber === "number" ) {
if(options.breadcrumbsNumber > 25) {
breadcrumbs_number = 25;
} else if(options.breadcrumbsNumber >= 10 && options.breadcrumbsNumber <= 25) {
} else if(options.breadcrumbsNumber <= 25) {
breadcrumbs_number = options.breadcrumbsNumber;
}
}

if (breadcrumbs.length >= breadcrumbs_number) {
if (breadcrumbs.length > breadcrumbs_number) {
breadcrumbs.shift();
}
}
Expand Down
2 changes: 1 addition & 1 deletion typescript/elmahio.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ declare namespace Elmahio {
breadcrumbs?: boolean;
/**
* Number of breadcrumbs to log.
* Minimum 10, maximum 25 breadcrumbs.
* Maximum 25 breadcrumbs.
*/
breadcrumbsNumber?: number;
}
Expand Down

0 comments on commit 03bb6f6

Please sign in to comment.