Fix carousel forgetting its position in certain circumstances.

This commit is contained in:
Dermot Duffy
2022-07-27 21:03:10 -07:00
parent 040486082e
commit 30e7ee04bf
2 changed files with 24 additions and 13 deletions
+1 -2
View File
@@ -284,9 +284,8 @@ export class FrigateCardLiveCarousel extends LitElement {
const oldView = changedProperties.get('view') as View | undefined;
if (
frigateCardCarousel &&
oldView &&
this.view?.camera &&
this.view?.camera != oldView.camera
(!oldView || this.view?.camera !== oldView.camera)
) {
const slide: number | undefined = this._cameraToSlide[this.view.camera];
if (