Skip to content

Commit

Permalink
Lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
bstopp committed Jan 22, 2024
1 parent a8adb2a commit 94a0224
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cigaradvisor/blocks/article-list/article-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ export default async function decorate(block) {
await loadCSS(`${window.hlx.codeBasePath}/blocks/article-teaser/article-teaser.css`);
const configs = readBlockConfig(block);
block.innerHTML = '';
// eslint-disable-next-line prefer-const
let { category, author, limit = 10 } = configs;
if (!category && configs.hasOwnProperty('category') && window.location.pathname.includes('/cigaradvisor/category/')) {
if (!category && Object.hasOwn(configs, 'category') && window.location.pathname.includes('/cigaradvisor/category/')) {
category = window.location.toString();
} else if (!author && configs.hasOwnProperty('author') && window.location.pathname.includes('/cigaradvisor/author/')) {
} else if (!author && Object.hasOwn(configs, 'author') && window.location.pathname.includes('/cigaradvisor/author/')) {
author = window.location.toString();
}
const parentDiv = document.createElement('div');
Expand All @@ -91,7 +92,6 @@ export default async function decorate(block) {
const rightDiv = document.createElement('div');
rightDiv.classList.add('right-grid');


let current = rightDiv;
let currentPage = 1;
if (category || author) {
Expand Down

0 comments on commit 94a0224

Please sign in to comment.