Skip to content

Commit 8dedc1a

Browse files
Fix nav-state JavaScript lint issues
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 3edbe44 commit 8dedc1a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/scripts/site-injectors/nav-state.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
const topLevelToggles = Array.from(
1818
primaryList.querySelectorAll(
19-
":scope > li > input.md-nav__toggle.md-toggle[id]"
20-
)
19+
":scope > li > input.md-nav__toggle.md-toggle[id]",
20+
),
2121
);
2222
const topLevelIds = new Set(topLevelToggles.map((toggle) => toggle.id));
2323

@@ -36,7 +36,7 @@
3636
try {
3737
const state = JSON.parse(raw);
3838
for (const toggle of toggles) {
39-
if (Object.prototype.hasOwnProperty.call(state, toggle.id)) {
39+
if (Object.hasOwn(state, toggle.id)) {
4040
toggle.checked = !!state[toggle.id];
4141
}
4242
}

0 commit comments

Comments
 (0)