Skip to content

Commit

Permalink
Allow negative numbers in config.showImported to mean 'all'
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed Feb 14, 2024
1 parent 4787923 commit ca0bb42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/config.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ if (!showImportedParam) {
}
if (showImportedParam) {
if (typeof showImportedParam === "number" || !isNaN(parseInt(showImportedParam))) {
config.showImported = parseInt(showImportedParam);
const showImportedNumber = parseInt(showImportedParam);
config.showImported = showImportedNumber < 0 ? true : showImportedNumber;
} else {
config.showImported = ['true', 'on', 'all'].includes(showImportedParam);
}
Expand Down

0 comments on commit ca0bb42

Please sign in to comment.