Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obsolete destructuring in decorate.js::decorateIcons #40

Open
flx-sta opened this issue Feb 8, 2024 · 0 comments
Open

Obsolete destructuring in decorate.js::decorateIcons #40

flx-sta opened this issue Feb 8, 2024 · 0 comments

Comments

@flx-sta
Copy link

flx-sta commented Feb 8, 2024

Expected Behaviour

/**
 * Add <img> for icons, prefixed with codeBasePath and optional prefix.
 * @param {Element} [element] Element containing icons
 * @param {string} [prefix] prefix to be added to icon the src
 */
function decorateIcons(element, prefix = '') {
  const icons = element.querySelectorAll('span.icon');
  icons.forEach((span) => {
    decorateIcon(span, prefix);
  });
}

Actual Behaviour

/**
 * Add <img> for icons, prefixed with codeBasePath and optional prefix.
 * @param {Element} [element] Element containing icons
 * @param {string} [prefix] prefix to be added to icon the src
 */
function decorateIcons(element, prefix = '') {
  const icons = [...element.querySelectorAll('span.icon')];
  icons.forEach((span) => {
    decorateIcon(span, prefix);
  });
}

Reproduce Scenario (including but not limited to)

n/a

Steps to Reproduce

n/a

Platform and Version

n/a

Sample Code that illustrates the problem

n/a

Logs taken while reproducing problem

n/a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant