Skip to content

Commit 81900e7

Browse files
cswilson252samfreund
authored andcommitted
finding lastIndex
1 parent 5b7c9ce commit 81900e7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

photon-client/src/components/cameras/CameraCalibrationCard.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ watchEffect(() => {
9999
const names = useCameraSettingsStore().currentCameraSettings.validVideoFormats.map((f) =>
100100
getResolutionString(f.resolution)
101101
);
102-
uniqueVideoResolutionString.value = names[currentIndex] ?? names[0] ?? "";
102+
const lastIndex = names.lastIndexOf("");
103+
uniqueVideoResolutionString.value = names[currentIndex] ?? names[lastIndex] ?? "";
103104
});
104105
const squareSizeIn = ref(1);
105106
const markerSizeIn = ref(0.75);

0 commit comments

Comments
 (0)