Skip to content

Commit

Permalink
fix: ensure active class name
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelhenke committed Dec 15, 2022
1 parent f728752 commit b21fbf7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ios-calculator.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,20 @@ const CHARACTERS = {
COMMA: ',',
};

const ACTIVE_CLASS_NAME = 'active';

/**
* @param {HTMLElement} elem
*/
function addActiveState(element) {
element.classList.add('active');
element.classList.add(ACTIVE_CLASS_NAME);
}

/**
* @param {HTMLElement} elem
*/
function removeActiveState(element) {
element.classList.remove('active');
element.classList.remove(ACTIVE_CLASS_NAME);
}

function isOperand(char) {
Expand Down

0 comments on commit b21fbf7

Please sign in to comment.