Skip to content

Commit

Permalink
refactor: improve variable and conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
dewanakl committed Dec 31, 2024
1 parent a2cec97 commit 9d14c03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions js/pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ export const pagination = (() => {
const enableNext = () => liNext.classList.contains('disabled') ? liNext.classList.remove('disabled') : null;

const enablePagination = () => {
const pagination = document.getElementById('pagination');
if (pagination.classList.contains('d-none')) {
pagination.classList.remove('d-none');
const paginate = document.getElementById('pagination');
if (paginate.classList.contains('d-none')) {
paginate.classList.remove('d-none');
}
};

Expand Down
6 changes: 2 additions & 4 deletions js/progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ export const progress = (() => {
};

const add = () => {
if (!push) {
return;
if (push) {
total += 1;
}

total += 1;
};

const complete = (type) => {
Expand Down

0 comments on commit 9d14c03

Please sign in to comment.