@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.cjs CHANGED
@@ -430,7 +430,10 @@ function latch() {
430
430
  }
431
431
  function failureMediaIdentity(ref, src) {
432
432
  if (ref && typeof ref === "object" && ref.file_id) return `file:${ref.file_id}`;
433
- const raw = typeof ref === "string" ? ref : (ref && typeof ref === "object" ? ref.url ?? null : null) ?? src ?? null;
433
+ let raw;
434
+ if (typeof ref === "string") raw = ref;
435
+ else if (ref && typeof ref === "object" && ref.url) raw = ref.url;
436
+ else raw = src;
434
437
  if (!raw) return "<unknown-media>";
435
438
  if (raw.startsWith("blob:")) return "blob:object-url";
436
439
  try {