@ai-matrx/media 0.5.9 → 0.5.10

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/viewers.js CHANGED
@@ -388,7 +388,10 @@ function latch() {
388
388
  }
389
389
  function failureMediaIdentity(ref, src) {
390
390
  if (ref && typeof ref === "object" && ref.file_id) return `file:${ref.file_id}`;
391
- const raw = typeof ref === "string" ? ref : (ref && typeof ref === "object" ? ref.url ?? null : null) ?? src ?? null;
391
+ let raw;
392
+ if (typeof ref === "string") raw = ref;
393
+ else if (ref && typeof ref === "object" && ref.url) raw = ref.url;
394
+ else raw = src;
392
395
  if (!raw) return "<unknown-media>";
393
396
  if (raw.startsWith("blob:")) return "blob:object-url";
394
397
  try {