Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplication issue with switch #884

Open
Mas4hmad opened this issue Sep 29, 2024 · 0 comments
Open

Duplication issue with switch #884

Mas4hmad opened this issue Sep 29, 2024 · 0 comments
Assignees
Labels
2.X Issues for the 2.X branch

Comments

@Mas4hmad
Copy link

hi. i encountered issue when use switch-case like below:

<%= window.story.render("Function") %>
<div style="margin:4.5em 0 0 0" class="flex two-800">
  <div class="none third-800">
    <article class="card">
      <header>
        <h3><%= s.sidebarTitle %><a href="javascript:void(0)" onclick>></a></h3>
      </header>
      <footer>
        <%= s.sidebarContent%>
      </footer>
    </article>
  </div>
  <div class="full two-third-800">
    <article class="card">
      <header>
        <h3>Minggu, 12 Rabiul Awwal 1445 H</h3>
      </header>
      <footer>
        ### Malam ini sangat cerah.
        <h3>tindakan</h3>
        <span class="button stack pseudo icon-picture">Home</span>
        <span class="button stack pseudo icon-puzzle">Plugins</span>
        <span class="button stack pseudo icon-file-code">Documentation</span>
        <span class="button stack pseudo icon-help-circled">Test</span>
      </footer>
    </article>
  </div>
  <div class="full none-800"><span>3</span></div>
</div>

:: Function
<%
if (typeof s.sidebarNum === 'undefined' || s.sidebarNum === null) {
  s.sidebarNum = 0;
};
  switch(s.sidebarNum) {
    case 0:
        s.sidebarTitle = "Pergi Ke";
        s.sidebarContent = %>
            <span class="button stack icon-picture">Home</span>
            <span class="button stack icon-puzzle">Plugins</span>
            <span class="button stack icon-file-code">Documentation</span>
            <span class="button stack icon-help-circled">Test</span>
        <%;
        break;
    case 1:
        s.sidebarTitle = "Tindakan yang bisa dilakukan.";
        s.sidebarContent = "Pilih Lokasi mana yang akan di tuju.";
        break;
    case 2:
        s.sidebarTitle = "Profil karakter.";
        s.sidebarContent = "Pilih Lokasi mana yang akan di tuju.";
        break;
    default:
        s.sidebarTitle = "Informasi tidak tersedia.";
        s.sidebarContent = "Pilih Lokasi mana yang akan di tuju.";
}
%>

Screenshot_20240929_071456

i have duplicated render with closing formatted-brackets as it rendered in screen above which is not intended to render. i hope you understand.

Thanks

@Mas4hmad Mas4hmad closed this as not planned Won't fix, can't repro, duplicate, stale Oct 23, 2024
@videlais videlais reopened this Oct 23, 2024
@videlais videlais self-assigned this Oct 23, 2024
@videlais videlais added the 2.X Issues for the 2.X branch label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.X Issues for the 2.X branch
Projects
None yet
Development

No branches or pull requests

2 participants