@ai-matrx/media 0.5.9 → 0.5.11

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/react.js CHANGED
@@ -514,7 +514,10 @@ function latch() {
514
514
  }
515
515
  function failureMediaIdentity(ref, src) {
516
516
  if (ref && typeof ref === "object" && ref.file_id) return `file:${ref.file_id}`;
517
- const raw = typeof ref === "string" ? ref : (ref && typeof ref === "object" ? ref.url ?? null : null) ?? src ?? null;
517
+ let raw;
518
+ if (typeof ref === "string") raw = ref;
519
+ else if (ref && typeof ref === "object" && ref.url) raw = ref.url;
520
+ else raw = src;
518
521
  if (!raw) return "<unknown-media>";
519
522
  if (raw.startsWith("blob:")) return "blob:object-url";
520
523
  try {