A Link Resolver function is currently required in asLink and asHTML.
A Link Resolver should be optional instead since users may use Route Resolvers to populate a document or link's url field. In those cases, a Link Resolver would be unnecessary.
When a Link Resolver is not provided, it should fallback to field.url. This is what v1 does:
A Link Resolver function is currently required in
asLink
andasHTML
.A Link Resolver should be optional instead since users may use Route Resolvers to populate a document or link's
url
field. In those cases, a Link Resolver would be unnecessary.When a Link Resolver is not provided, it should fallback to
field.url
. This is what v1 does:https://github.com/prismicio/prismic-helpers/blob/d52211645faad6a85d2d6874a8477254cbbc4da8/src/link.js#L4-L17