Skip to content

Commit

Permalink
Fix css selector maybe undefined when animating panel's content
Browse files Browse the repository at this point in the history
  • Loading branch information
dk981234 committed Apr 2, 2024
1 parent 4a4e876 commit b6f772d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/survey-element.ts
Expand Up @@ -1064,7 +1064,13 @@ export class SurveyElement<E = any> extends SurveyElementCore implements ISurvey
},
getAnimatedElement: () => {
const cssClasses = this.isPanel ? this.cssClasses.panel : this.cssClasses;
return this.getWrapperElement()?.querySelector(classesToSelector(cssClasses.content));
if(cssClasses.content) {
const selector = classesToSelector(cssClasses.content);
if(selector) {
return this.getWrapperElement()?.querySelector(selector);
}
}
return undefined;
},
isAnimationEnabled: () => settings.animationEnabled && this.animationAllowed && !this.isDesignMode
};
Expand Down

0 comments on commit b6f772d

Please sign in to comment.