Skip to content

Commit

Permalink
cleared lint issues imageshyperlink1
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinaykumargujja committed Oct 23, 2023
1 parent a352a9f commit 634b36b
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions blocks/imageshyperlink/imageshyperlink.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
import { readBlockConfig } from '../../scripts/aem.js';
/**
* loads and decorates the footer
* @param {Element} block The footer block element
*/
export default async function decorate(block) {
const anchorEl = document.createElement("a");
let refAnchorEl = block.querySelector("a");
let pic = block.querySelector("picture");
const anchorEl = document.createElement('a');
const refAnchorEl = block.querySelector('a');
const pic = block.querySelector('picture');
if (refAnchorEl) {
refAnchorEl.hasAttribute("href") && anchorEl.setAttribute("href", refAnchorEl.getAttribute("href"));
refAnchorEl.getAttribute("title") && anchorEl.setAttribute("title", refAnchorEl.getAttribute("title"));
refAnchorEl.getAttribute("alt") && anchorEl.setAttribute("alt", refAnchorEl.getAttribute("alt"));
refAnchorEl.hasAttribute('href') && anchorEl.setAttribute('href', refAnchorEl.getAttribute('href'));

Check failure on line 10 in blocks/imageshyperlink/imageshyperlink.js

View workflow job for this annotation

GitHub Actions / build

Expected an assignment or function call and instead saw an expression
refAnchorEl.getAttribute('title') && anchorEl.setAttribute('title', refAnchorEl.getAttribute('title'));

Check failure on line 11 in blocks/imageshyperlink/imageshyperlink.js

View workflow job for this annotation

GitHub Actions / build

Expected an assignment or function call and instead saw an expression
refAnchorEl.getAttribute('alt') && anchorEl.setAttribute('alt', refAnchorEl.getAttribute('alt'));

Check failure on line 12 in blocks/imageshyperlink/imageshyperlink.js

View workflow job for this annotation

GitHub Actions / build

Expected an assignment or function call and instead saw an expression
anchorEl.appendChild(pic);
block.textContent = "";
block.textContent = '';
block.append(anchorEl);
} else {
block.textContent = "";
block.textContent = '';
block.append(pic);
}
}
}

0 comments on commit 634b36b

Please sign in to comment.