From 1c8cfb3004ff14c529060612bdca9b4404479e69 Mon Sep 17 00:00:00 2001 From: bdeshi Date: Sun, 7 Jun 2026 23:19:45 +0600 Subject: [PATCH] nothing saved yet on a fresh install, just take what's there --- main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.js b/main.js index eeb3a9b..f55fa28 100644 --- a/main.js +++ b/main.js @@ -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);