Skip to content

Commit

Permalink
Make sonar happy
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis committed Sep 20, 2024
1 parent 45b59d2 commit 2497ff2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/js/serial_backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ function checkReportProblems() {

if (needsProblemReportingDialog) {

problems.map((problem) => {
problems.forEach((problem) => {
problemItemTemplate.clone().html(problem.description).appendTo(problemDialogList);
});

Expand Down
10 changes: 1 addition & 9 deletions src/js/utils/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ export function ispConnected() {
const connected = navigator.onLine;
const isMetered = getConfig('meteredConnection').meteredConnection;

if (!navigator.connection) {
return connected && !isMetered;
}

if (isMetered || navigator.connection.effectiveType === 'none' || !connected) {
return false;
}

return true;
return connected && !isMetered;
}

0 comments on commit 2497ff2

Please sign in to comment.