Skip to content

Commit b81698f

Browse files
committed
feat: reset the jlinkcompatibility memoize cache after jlink install
1 parent 0b0cd3f commit b81698f

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎src/launcher/features/jlinkUpdate/JLinkUpdateProgressDialog.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
GenericDialog,
1212
} from '@nordicsemiconductor/pc-nrfconnect-shared';
1313

14+
import { resetJlinkCompatibilityCache } from '../../util/appCompatibilityWarning';
1415
import { useLauncherDispatch, useLauncherSelector } from '../../util/hooks';
1516
import { continueUpdateProcess } from '../process/updateProcess';
1617
import {
@@ -39,6 +40,7 @@ export default () => {
3940
<DialogButton
4041
onClick={() => {
4142
dispatch(reset());
43+
resetJlinkCompatibilityCache();
4244
dispatch(continueUpdateProcess());
4345
}}
4446
disabled={!finished}

‎src/launcher/util/appCompatibilityWarning.tsx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ const getJlinkCompatibility = memoize(
193193
},
194194
);
195195

196+
export const resetJlinkCompatibilityCache = () => {
197+
getJlinkCompatibility.cache.clear?.();
198+
};
199+
196200
export const checkJLinkRequirements: AppCompatibilityChecker = async (
197201
app: LaunchableApp,
198202
) => {

0 commit comments

Comments
 (0)