# 추적 변수를 찾을 수 없나요?

**URL:** <https://meta.discourse.org/t/tracked-variable-not-found/370793>\
**Category:** Development\
**Created:** [6월 19, 2025, 5:06오전 UTC](https://meta.discourse.org/t/tracked-variable-not-found/370793 "2025-06-19T05:06:56Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)\
**Post date:** [6월 20, 2025, 1:21오전 UTC](https://meta.discourse.org/t/tracked-variable-not-found/370793/6 "2025-06-20T01:21:22Z")

</div>

~~@merefield 님, 이 함수를 어떻게 통과해야 하는지 모르겠어요:

```js
function ifProtected() {
  if(category.read_restricted) {
    return this.lockIcon;
  }
}

```

 ~~

어떻게 반환해야 할지 조언을 주실 수 있을까요? 이 파일이 .gjs 파일인데, 이렇게 반환할 수 있을까요?

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

```

* * *

수정:  
다음으로 변경했습니다:

```gjs
const iconName = settings.category_lock_icon || 'lock'; // 설정이 정의되지 않으면 'lock'으로 대체
const lockIcon = <template>{{icon this.iconName}}</template>

```

올바른 방향으로 이끌어 주셔서 감사합니다!

---

_[View the full topic](https://meta.discourse.org/t/tracked-variable-not-found/370793)._
