Tracked variable not found?

Hi @merefield , I can't seem how to get past this function:
function ifProtected() {
  if(category.read_restricted) {
    return this.lockIcon;
  }
}

Any advice on how I would return this? Since this is in a .gjs file, is it possible to return

return <template>{{icon this.iconName}}</template>

?


EDIT:
I’ve changed them to:

const iconName = settings.category_lock_icon || 'lock'; // Fallback to 'lock' if setting is not defined
const lockIcon = <template>{{icon this.iconName}}</template>

Thanks for the nudge in the correct direction!