submissions(#23): coerce getEditors() (Set) before mapping in the submissions pane

With FEATURE_SUBMISSIONS on, refreshAdminPaneState fires populateSubmissions,
which mapped accessControl.getEditors() directly — but that returns a Set, so
`.map` threw ("map is not a function") as a leaked async rejection after the
profile-modal test ended. Coerce with Array.from() (handles Set or array).
profile-modal-controller tests 26/26.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
thePR0M3TH3ANandClaude Opus 4.8 committed 2026-07-06 21:14:14 -04:00
1 parent 8eddb11a03
commit 7cbd77110d
1 file changed
+2 -1
+2 -1
View File
@@ -36,7 +36,8 @@ export async function populateSubmissions(controller) {
}
const adminHex = safeDecodeNpub(controller.mainController.adminSuperNpub);
const editorHexes = (accessControl.getEditors?.() || [])
// getEditors() may return a Set (or array) — coerce before mapping.
const editorHexes = Array.from(accessControl.getEditors?.() || [])
.map((npub) => safeDecodeNpub(npub))
.filter(Boolean);