Add check to avoid undefined value
This commit is contained in:
parent
7a733b7382
commit
6b90f571e7
@ -166,7 +166,11 @@ class Presentation extends PureComponent {
|
||||
this.onResize();
|
||||
}
|
||||
|
||||
if (currentSlide.num !== prevProps.currentSlide.num) {
|
||||
if (
|
||||
currentSlide?.num != null &&
|
||||
prevProps?.currentSlide?.num != null &&
|
||||
currentSlide?.num !== prevProps.currentSlide?.num
|
||||
) {
|
||||
politeSRAlert(intl.formatMessage(intlMessages.slideContentChanged, { 0: currentSlide.num }));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user