craft-linkfield icon indicating copy to clipboard operation
craft-linkfield copied to clipboard

Impossible to invoke a method ("getLink") on a null variable.

Open mark-chief opened this issue 2 years ago • 0 comments

In craft 4, I am getting this error when using the below code.

Impossible to invoke a method ("getLink") on a null variable.

{{ block.cta.getLink({
  class: 'cta cta-light',
 }) }}

The field is in a Matrix > Supertable >Matrix structure.

{{ block.cta }} outputs the URL ok.

Thanks

mark-chief avatar Sep 06 '22 10:09 mark-chief