Skip to content

Commit

Permalink
refactor: . remove useless if
Browse files Browse the repository at this point in the history
  • Loading branch information
ilandikov committed Nov 22, 2023
1 parent 16ccc93 commit 5f93082
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/TaskLineRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,7 @@ export class TaskLineRenderer {

// Add the component's CSS class describing what this component is (priority, due date etc.)
const componentClass = fieldLayouts.className(component);
if (componentClass !== '') {
// DOMTokenList.add() fails if the input is an empty string
span.classList.add(...[componentClass]);
}
span.classList.add(...[componentClass]);

// Add the component's attribute ('priority-medium', 'due-past-1d' etc.)
const componentDataAttribute = fieldLayouts.dataAttribute(component, task);
Expand Down

0 comments on commit 5f93082

Please sign in to comment.