Skip to content

Commit

Permalink
Update sw.js
Browse files Browse the repository at this point in the history
replacing the var keywords with let/const
  • Loading branch information
yukiyuli committed Oct 13, 2022
1 parent f96b4af commit 7fc86ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions public/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ self.onnotificationclick = function (event) {
clients.matchAll({
type: "window"
}).then(function(clientList) {
for (var i = 0; i < clientList.length; i++) {
var client = clientList[i];
for (let i = 0; i < clientList.length; i++) {
let client = clientList[i];
if (client.url == '/' && 'focus' in client)
return client.focus();
}
Expand All @@ -17,4 +17,4 @@ self.onnotificationclick = function (event) {
})
);

};
};

0 comments on commit 7fc86ff

Please sign in to comment.