Skip to content

Commit

Permalink
Fix: Return actual ID for given UUID instance
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich committed Jan 6, 2023
1 parent 3925514 commit afab394
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions classes/BlurHash.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,10 @@ private static function calcWidthHeight(int $target, float $ratio): array
*/
private static function getId(Asset|File $file): string
{
if($file instanceof Asset)
if ($file instanceof Asset) {
return $file->mediaHash();
}

return $file->uuid() ?? $file->id();
return $file->uuid()->id() ?? $file->id();
}
}

0 comments on commit afab394

Please sign in to comment.