nothing saved yet on a fresh install, just take what's there

This commit is contained in:
bdeshi committed 2026-06-07 23:19:45 +06:00
1 parent c74d6803d2
commit 1c8cfb3004
1 file changed
+5
+5
View File
@@ -11,7 +11,12 @@ module.exports = class RibbonOrderLock extends Plugin {
enforceOrder() {
const ribbon = this.app.workspace.leftRibbon;
const order = this.settings.order;
if (order.length === 0) {
this.recordOrder(ribbon);
return;
}
const sorted = [...ribbon.items].sort((a, b) => {
const ia = order.indexOf(a.id);