Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/dataStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const getChapterById = (chapterId) => {
if (!chapters.length) {
return null;
}
return chapters.find((chapter) => chapter.id === chapterId) || chapters[0];
return chapters.find((chapter) => chapter.id === chapterId) || null;
};

const setDeathLock = (lockId, locked) => {
Expand Down
2 changes: 1 addition & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ app.get("/root", (req, res) => {
entities: lore.entities,
overrides: lore.overrides,
state,
rootTokenHint: config.rootToken ? "Set via ROOT_TOKEN" : "Unset"
rootTokenHint: process.env.ROOT_TOKEN ? "Set via ROOT_TOKEN" : "Unset"
});
});

Expand Down
2 changes: 1 addition & 1 deletion views/brand.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<div class="meter" data-value="<%= chapter ? chapter.mentalFracture : 0 %>">
<span></span>
<div class="meter-label">
<strong><%= chapter ? chapter.mentalFracture : 0 %>%</strong> Integrity Remaining
<strong><%= chapter ? chapter.mentalFracture : 0 %>%</strong> Fractured
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion views/causality.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<div class="side-section">
<h3>Canon Seal</h3>
<div class="whisper">
<%= overrides.canonSeal ? 'Sealed at ' + overrides.canonSeal.timestamp : 'Unsealed. The record leaks.' %>
<%= overrides.canonSeal && overrides.canonSeal.sealed ? 'Sealed at ' + overrides.canonSeal.timestamp : 'Unsealed. The record leaks.' %>
</div>
</div>
</aside>
Expand Down
4 changes: 2 additions & 2 deletions views/root.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<div class="side-section">
<h3>Apostles Spawn Control</h3>
<ul class="toggle-list">
<% entities.apostles.forEach(function(apostle) { %>
<% state.apostles.forEach(function(apostle) { %>
<li>
<label>
<input type="checkbox" data-apostle-id="<%= apostle.id %>" <%= apostle.active ? 'checked' : '' %> />
Expand All @@ -101,7 +101,7 @@
<button
class="advance-btn"
data-root-action="canon"
data-canon-sealed="<%= overrides.canonSeal ? 'true' : 'false' %>"
data-canon-sealed="<%= overrides.canonSeal && overrides.canonSeal.sealed ? 'true' : 'false' %>"
>
Toggle Canon Seal
</button>
Expand Down