Skip to content

Commit

Permalink
Minor variable name updates to ensure clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
SonicScrewdriver committed Oct 23, 2023
1 parent 74d7b8c commit 807202a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/perseus/src/article-renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,18 @@ class ArticleRenderer
let focusedInput;

if (this._currentFocus) {
const [sectionRef, ...focusPath] = this._currentFocus;
const [sectionIndex, ...focusPath] = this._currentFocus;

const inputPaths =
this.sectionRenderers[sectionRef].getInputPaths();
this.sectionRenderers[sectionIndex].getInputPaths();

didFocusInput = inputPaths.some((inputPath) => {
return Util.inputPathsEqual(inputPath, focusPath);
});
focusedInput =
this.sectionRenderers[sectionRef].getDOMNodeForPath(focusPath);
this.sectionRenderers[sectionIndex].getDOMNodeForPath(
focusPath,
);
}

if (this.props.apiOptions.onFocusChange != null) {
Expand Down Expand Up @@ -144,8 +146,8 @@ class ArticleRenderer

blur: () => void = () => {
if (this._currentFocus) {
const [sectionRef, ...inputPath] = this._currentFocus;
this.sectionRenderers[sectionRef].blurPath(inputPath);
const [sectionIndex, ...inputPath] = this._currentFocus;
this.sectionRenderers[sectionIndex].blurPath(inputPath);
}
};

Expand Down

0 comments on commit 807202a

Please sign in to comment.