KnowBe4 지식 베이스에 오신 걸 환영합니다!
어떻게 도움을 드릴 수 있을까요?
주제별로 찾아보기
도움이 더 필요하세요?
Recent updates
<% } %>-
<% articles.forEach(function(article) { %>
<% /* Both lookups can miss, and the category one has to be guarded by
the section it reads. sections and categories are fetched as
separate API calls from articles, and all three are
permission-filtered per viewer, so an article can legitimately
arrive whose section is not in the list -- and section['category_id']
on a null section throws. A throw here is not contained: the whole
recent-updates block fails to render, because a micro-template has
no error boundary around a single iteration. A missing category just
drops the badge, which the `if (category)` below already handles. */ %>
<% var section = sections.filter(function(section) { return section.id === article['section_id']; })[0] || null; %>
<% var category = section ? (categories.filter(function(category) { return category.id === section['category_id']; })[0] || null) : null; %>
-
<% if (category) { %>
<% var categoryPosition = category.position; %>
<% var badgeVariant = (categoryPosition >= 3 && categoryPosition < 6) ? categoryPosition - 2 : 0; %>
<%= category.name %>
<% } %>
<%= article.title %>
문서 보기
<% }) %>