Skip to content

Commit

Permalink
fix: fix code scanning alerts (#1155)
Browse files Browse the repository at this point in the history
  • Loading branch information
zchenwei authored Feb 15, 2024
1 parent 3a7c743 commit 575cbcc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function ArrayField({
setSelectedBadgeIndex(undefined);
};
const addItem = async () => {
if ((currentFieldValue !== undefined || currentFieldValue !== null || currentFieldValue !== '') && !hasError) {
if ((currentFieldValue !== undefined || currentFieldValue !== '') && !hasError) {
const newItems = [...items];
if (selectedBadgeIndex !== undefined) {
newItems[selectedBadgeIndex] = currentFieldValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function ArrayField({
setSelectedBadgeIndex(undefined);
};
const addItem = async () => {
if ((currentFieldValue !== undefined || currentFieldValue !== null || currentFieldValue !== '') && !hasError) {
if ((currentFieldValue !== undefined || currentFieldValue !== '') && !hasError) {
const newItems = [...items];
if (selectedBadgeIndex !== undefined) {
newItems[selectedBadgeIndex] = currentFieldValue;
Expand Down
2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const {
module.exports = {
extends: ['@commitlint/config-conventional', '@commitlint/config-lerna-scopes'],
rules: {
'scope-enum': async (context) => [2, 'always', [...(await getPackages(context)), 'release', 'deps']],
'scope-enum': async (context) => [2, 'always', [...(await getPackages(context)), 'release', 'deps', 'deps-dev']],
'header-max-length': [2, 'always', 200],
},
};

0 comments on commit 575cbcc

Please sign in to comment.