mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 14:42:11 -03:00
fix(banner): ensure href attribute defaults to '#' for actions without a URL
This commit is contained in:
@@ -136,10 +136,10 @@ class BannerService {
|
|||||||
|
|
||||||
const actionsHtml = banner.actions ? banner.actions.map(action => {
|
const actionsHtml = banner.actions ? banner.actions.map(action => {
|
||||||
const actionAttribute = action.action ? `data-action="${action.action}"` : '';
|
const actionAttribute = action.action ? `data-action="${action.action}"` : '';
|
||||||
const href = action.url ? `href="${action.url}"` : '#';
|
const href = action.url ? `href="${action.url}"` : 'href="#"';
|
||||||
const target = action.url ? 'target="_blank" rel="noopener noreferrer"' : '';
|
const target = action.url ? 'target="_blank" rel="noopener noreferrer"' : '';
|
||||||
|
|
||||||
return `<a ${href ? `href="${href}"` : ''} ${target} class="banner-action banner-action-${action.type}" ${actionAttribute}>
|
return `<a ${href} ${target} class="banner-action banner-action-${action.type}" ${actionAttribute}>
|
||||||
<i class="${action.icon}"></i>
|
<i class="${action.icon}"></i>
|
||||||
<span>${action.text}</span>
|
<span>${action.text}</span>
|
||||||
</a>`;
|
</a>`;
|
||||||
|
|||||||
Reference in New Issue
Block a user