File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
photon-client/src/components/settings Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ const openOfflineUpdatePrompt = () => {
3232};
3333
3434const offlineUpdateRegex = new RegExp (" photonvision-((?:dev-)?v[\\ w.-]+)-((?:linux|win|mac)\\ w+)\\ .jar" );
35- const majorVersionRegex = new RegExp (" / (?:dev-)?(\d +)\.\ d +\.\d +/ " );
35+ const majorVersionRegex = new RegExp (" (?:dev-)?(\\ d+)\\ . \\ d+\\ . \\ d+ " );
3636
3737const offlineUpdateDialog = ref ({ show: false , version: " " , confirmString: " " });
3838
@@ -55,9 +55,10 @@ const handleOfflineUpdateRequest = async () => {
5555 const currentVersion = useSettingsStore ().general .imageVersion ;
5656 const currentArch = useSettingsStore ().general .wpilibArch ;
5757
58- const versionMatch = currentVersion
59- ? version .match (majorVersionRegex )?.[1 ] === currentVersion .match (majorVersionRegex )?.[1 ]
60- : false ;
58+ const versionMajor = version .match (majorVersionRegex )?.[1 ];
59+ const currentVersionMajor = currentVersion ?.match (majorVersionRegex )?.[1 ];
60+
61+ const versionMatch = currentVersion ? versionMajor === currentVersionMajor : false ;
6162 const dev = version .includes (" dev" );
6263
6364 const confirmStrings = [
You can’t perform that action at this time.
0 commit comments