Skip to content

Commit 99f28b1

Browse files
committed
streamline added panel paths handling
1 parent 9c2ff38 commit 99f28b1

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

src/utilities/model/store.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,17 +131,12 @@ export default class Store {
131131
// Handle added panels — merge into stored panel order so they are not re-detected as new
132132
if (added && added.length > 0) {
133133
const currentOrder: string[] = JSON.parse(getStorage(STORAGE.PANEL_ORDER) || '[]');
134-
const addedPaths = added.map((item) => item.url_path);
134+
const addedPaths = added.map((item) => item.url_path!);
135135
const newPaths = addedPaths.filter((path) => !currentOrder.includes(path));
136136
if (newPaths.length > 0) {
137137
const updatedOrder = [...currentOrder, ...newPaths];
138138
setStorage(STORAGE.PANEL_ORDER, updatedOrder);
139-
console.debug(
140-
'%cSTORE:',
141-
'color: #4dabf7;',
142-
'Added new panels to stored panel order:',
143-
newPaths
144-
);
139+
console.debug('%cSTORE:', 'color: #4dabf7;', 'Added new panels to stored panel order:', newPaths);
145140
shouldReload = true;
146141
}
147142
}

0 commit comments

Comments
 (0)