File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export interface CompareSession {
2525 /**
2626 * The instance ID of the first item added to compare, so we can highlight it.
2727 */
28- readonly initialItemId ?: string ;
28+ initialItemId ?: string ;
2929
3030 /**
3131 * The ID of the character (if any) whose vendor response we should intermingle with owned items
Original file line number Diff line number Diff line change 1- import { addCompareItem , endCompareSession } from 'app/compare/actions' ;
1+ import { addCompareItem } from 'app/compare/actions' ;
2+ import { compareSessionSelector } from 'app/compare/selectors' ;
23import { settingSelector } from 'app/dim-api/selectors' ;
34import { t } from 'app/i18next-t' ;
45import { showInfuse } from 'app/infuse/infuse' ;
@@ -30,11 +31,12 @@ interface ActionButtonProps {
3031
3132export function CompareActionButton ( { item, label, fromCompare = false } : ActionButtonProps ) {
3233 const dispatch = useDispatch ( ) ;
34+ const session = useSelector ( compareSessionSelector ) ;
3335
3436 const openCompare = ( ) => {
3537 hideItemPopup ( ) ;
36- if ( fromCompare ) {
37- dispatch ( endCompareSession ( ) ) ;
38+ if ( fromCompare && session ) {
39+ session . initialItemId = item . id ;
3840 }
3941 dispatch ( addCompareItem ( item ) ) ;
4042 } ;
You can’t perform that action at this time.
0 commit comments