Skip to content

Commit f8e581d

Browse files
committed
Minor tweaks to router for linting
1 parent 7a7f53f commit f8e581d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

router/index.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,17 @@
5151
<script defer src="/static/sc-router.js"></script>
5252
<script>
5353
const router = document.querySelector('sc-router');
54+
const links = Array.from(document.querySelectorAll('a'));
5455

55-
function onClick(evt) {
56+
function onClick (evt) {
5657
evt.preventDefault();
5758
router.go(evt.target.href);
5859
}
5960

60-
let links = Array.from(document.querySelectorAll('a'));
61-
links.forEach(function(link) {
61+
links.forEach(link => {
6262
link.addEventListener('click', onClick);
6363
});
64-
</script>
64+
65+
</script>
6566
</body>
6667
</html>

router/static/sc-router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class SCRouter extends HTMLElement {
8383

8484
_addRoutes () {
8585
let views = Array.from(document.querySelectorAll('sc-view'));
86-
views.forEach(function(view) {
86+
views.forEach(view => {
8787
if (!view.route)
8888
return;
8989

0 commit comments

Comments
 (0)