Skip to content

Commit cee6c7b

Browse files
committed
Fix error if there are no slides
1 parent e03d44a commit cee6c7b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/codelab/src/app/admin/content/presentation-editor/side-panel/side-panel.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@ export class SidePanelComponent implements OnInit, OnChanges {
149149
}
150150

151151
resetSelected() {
152-
this.selectSingle(this.slides[this.currentSlideIndex].id);
152+
if(this.slides.length > 0){
153+
this.selectSingle(this.slides[this.currentSlideIndex].id);
154+
}
153155
}
154156

155157
getSelectedSlideIndexes(): number[] {

0 commit comments

Comments
 (0)