Skip to content
Merged
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 ui/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,6 @@ <h1 class="sec-title" id="ev-title">General</h1>
</div></div>
</div>

<script type="module" src="/js/admin.js?v=86e4165b"></script>
<script type="module" src="/js/admin.js?v=2909c5be"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion ui/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ async function writeItems(asked) {
throw Object.assign(new Error('stale'), { status: 409 });
}
const sent = JSON.stringify(state.items);
full.items = state.items;
full.items = JSON.parse(sent);
const r = await apiPost('/api/config', full);
_serverItems = JSON.stringify(r.items);
_savedItems = sent;
Expand Down
5 changes: 5 additions & 0 deletions ui/test/admin-nav.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ test('list saves run through one queue and undo through one reverting save', ()
src,
/_serverItems = JSON\.stringify\(r\.items\);\s*_savedItems = sent;\s*saveOrRestore\.landed\(JSON\.parse\(sent\)\);/,
);
assert.match(
src,
/const sent = JSON\.stringify\(state\.items\);\s*full\.items = JSON\.parse\(sent\);/,
'a retry after sign-in sends the body again; it must hold the list recorded as sent, not the live one',
);
});

const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
Expand Down
Loading