@ohhwells/bridge 0.1.52-next.137 → 0.1.52-next.139

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -9117,13 +9117,17 @@ function applyLogoImage(url, alt) {
9117
9117
  img.removeAttribute("sizes");
9118
9118
  img.src = url;
9119
9119
  img.alt = displayAlt;
9120
- img.style.display = "";
9120
+ img.style.display = "block";
9121
9121
  if (textEl) textEl.style.display = "none";
9122
9122
  root.removeAttribute("data-ohw-placeholder");
9123
9123
  return;
9124
9124
  }
9125
9125
  if (img) {
9126
- img.remove();
9126
+ img.removeAttribute("src");
9127
+ img.removeAttribute("srcset");
9128
+ img.removeAttribute("sizes");
9129
+ img.alt = displayAlt;
9130
+ img.style.display = "none";
9127
9131
  }
9128
9132
  if (!textEl) {
9129
9133
  textEl = document.createElement("span");
@@ -9148,13 +9152,15 @@ function applyLogoHref(href) {
9148
9152
  root.setAttribute("href", target);
9149
9153
  }
9150
9154
  });
9155
+ for (const key of LOGO_HREF_KEYS) setStoredLinkHref(key, target);
9151
9156
  }
9152
9157
  function readLogoIdentityFromDom() {
9153
9158
  let imageUrl = null;
9154
9159
  for (const key of LOGO_IMAGE_KEYS) {
9155
9160
  const el = document.querySelector(`[data-ohw-key="${key}"]`);
9156
9161
  const img = el instanceof HTMLImageElement ? el : el?.querySelector("img");
9157
- if (img?.src && !img.src.startsWith("data:") && img.style.display !== "none") {
9162
+ const attrSrc = img?.getAttribute("src")?.trim() ?? "";
9163
+ if (attrSrc && !attrSrc.startsWith("data:") && img && img.style.display !== "none") {
9158
9164
  imageUrl = img.currentSrc || img.src;
9159
9165
  break;
9160
9166
  }