Adjust `ptrToURI` to accept default placeholder for fallback
gdixon opened this issue · comments
Graham Dixon commented
Since ptrToURI
is supposed to return the URI for any protocol's ID, what are your thoughts on this approach vs. changing ptrToURI
to something like this:
function ptrToURI(logoPtr: MetaPtr | undefined | null, defaultURI: string = '/placeholder_grant.svg') {
// ...
}
This way you can pass in a URI to default to if none is present from the provided logoPtr
, and we don't need to duplicate the conditional protocol !== 0
check
Originally posted by @mds1 in #534 (comment)