Skip to content

Commit

Permalink
removed redudant parentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
SATHISHS03 committed Sep 25, 2024
1 parent 2149722 commit 6bb8d76
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ export default class Table {
* Check if the number of columns has reached the maximum allowed columns specified in the configuration,
* and if so, exit the function to prevent adding more columns beyond the limit.
*/
if ((this.config && this.config.maxcols) && (this.numberOfColumns >= this.config.maxcols)) {
if (this.config && this.config.maxcols && this.numberOfColumns >= this.config.maxcols) {
return;
}

Expand Down Expand Up @@ -398,7 +398,7 @@ export default class Table {
}

const addColButton = this.wrapper.querySelector(`.${CSS.addColumn}`);
if ((this.config?.maxcols && this.numberOfColumns > this.config.maxcols - 1) && (addColButton) ){
if (this.config?.maxcols && this.numberOfColumns > this.config.maxcols - 1 && addColButton ){
addColButton.classList.add(CSS.addColumnDisabled);
}
this.addHeadingAttrToFirstRow();
Expand Down Expand Up @@ -429,7 +429,7 @@ export default class Table {
* Check if the number of rows has reached the maximum allowed rows specified in the configuration,
* and if so, exit the function to prevent adding more columns beyond the limit.
*/
if ((this.config && this.config.maxrows) && (this.numberOfRows >= this.config.maxrows) && (addRowButton)) {
if (this.config && this.config.maxrows && this.numberOfRows >= this.config.maxrows && addRowButton) {
return;
}

Expand All @@ -454,7 +454,7 @@ export default class Table {
}

const addRowButton = this.wrapper.querySelector(`.${CSS.addRow}`);
if ((this.config && this.config.maxrows) && (this.numberOfRows >= this.config.maxrows) && (addRowButton)) {
if (this.config && this.config.maxrows && this.numberOfRows >= this.config.maxrows && addRowButton) {
addRowButton.classList.add(CSS.addRowDisabled);
}
return insertedRow;
Expand Down

0 comments on commit 6bb8d76

Please sign in to comment.