We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42feb21 commit 3db4920Copy full SHA for 3db4920
src/extensions/file_based_loadorder/index.ts
@@ -370,8 +370,9 @@ export default function init(context: IExtensionContext) {
370
context.registerActionCheck('SET_FB_LOAD_ORDER', (state, action: any) => {
371
const { profileId, loadOrder } = action.payload;
372
const profile = selectors.profileById(state, profileId);
373
- if (updateSet && profile !== undefined) {
374
- updateSet.init(profile.gameId, loadOrder.map((lo, idx) => ({ ...lo, index: idx })));
+ const gameId = profile?.gameId ?? selectors.activeGameId(state);
+ if (updateSet && gameId) {
375
+ updateSet.init(gameId, (loadOrder ?? []).map((lo, idx) => ({ ...lo, index: idx })));
376
}
377
return undefined;
378
});
0 commit comments