Skip to content

Commit

Permalink
Update HasIdentifier.php
Browse files Browse the repository at this point in the history
  • Loading branch information
toyi authored Jan 27, 2022
1 parent cb8d9fe commit c65ec14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HasIdentifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static function getIdByIdentifier(string $identifier): mixed
{
static::getModelByIdentifier($identifier, ['id']);

return optional(static::$fetchedIdentifiers[static::class][$identifier])->id;
return optional(static::$fetchedIdentifiers[static::class][$identifier] ?? null)->id;
}

public static function checkIdentifier(mixed $id, string $identifier): bool
Expand Down

0 comments on commit c65ec14

Please sign in to comment.