Skip to content

Commit

Permalink
Rename the variable to align with what it does
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljbruce committed Sep 28, 2023
1 parent df3f376 commit 4f54d94
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ export namespace entity {
const splitPath = path.split(delimiter);
const firstPathPart = splitPath.shift()!;
const remainderPath = splitPath.join(delimiter).replace(/^(\.|\[\])/, '');
const isFirstPathPartUndefined =
const isFirstPathPartDefined =
entity.properties![firstPathPart] !== undefined;

if (
Expand All @@ -857,7 +857,7 @@ export namespace entity {
if (
firstPathPartIsArray &&
// check also if the property in question is actually an array value.
isFirstPathPartUndefined &&
isFirstPathPartDefined &&
entity.properties![firstPathPart].arrayValue &&
// check if wildcard is not applied
!hasWildCard
Expand Down Expand Up @@ -886,7 +886,7 @@ export namespace entity {
firstPathPartIsArray &&
hasWildCard &&
remainderPath === '*' &&
isFirstPathPartUndefined
isFirstPathPartDefined
) {
const array = entity.properties![firstPathPart].arrayValue;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand All @@ -909,7 +909,7 @@ export namespace entity {
if (

Check failure on line 909 in src/entity.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `⏎············hasWildCard·&&⏎············remainderPath·===·'*'·&&⏎············isFirstPathPartDefined⏎··········` with `hasWildCard·&&·remainderPath·===·'*'·&&·isFirstPathPartDefined`
hasWildCard &&
remainderPath === '*' &&
isFirstPathPartUndefined
isFirstPathPartDefined
) {
const parentEntity = entity.properties![firstPathPart].entityValue;

Expand All @@ -923,7 +923,7 @@ export namespace entity {
} else {
excludePathFromEntity(entity, firstPathPart);
}
} else if (isFirstPathPartUndefined) {
} else if (isFirstPathPartDefined) {
const parentEntity = entity.properties![firstPathPart].entityValue;
excludePathFromEntity(parentEntity, remainderPath);
}
Expand Down

0 comments on commit 4f54d94

Please sign in to comment.