add sort for ActivationEvents

This commit is contained in:
weartist
2023-06-08 18:00:54 +08:00
parent 8ef497fcfd
commit 1d3ef64ad7
@@ -1707,7 +1707,10 @@ export class ExtensionEditor extends EditorPane {
const details = $('details', { open: true, ontoggle: onDetailsToggle },
$('summary', { tabindex: '0' }, localize('activation events', "Activation Events ({0})", activationEvents.length)),
$('ul', undefined, ...activationEvents.map(activationEvent => $('li', undefined, $('code', undefined, activationEvent))))
$('ul', undefined,
...activationEvents
.sort((a, b) => a.localeCompare(b))
.map(activationEvent => $('li', undefined, $('code', undefined, activationEvent))))
);
append(container, details);