Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private initializeFoundation = () => {
const {short, shortCollapsed, fixed} = this.props;
if (this.foundation) {
this.foundation.destroy();
}
if (short || shortCollapsed) {
this.foundation = new MDCShortTopAppBarFoundation(this.adapter);
} else if (fixed) {
this.foundation = new MDCFixedTopAppBarFoundation(this.adapter);
} else {
this.foundation = new MDCTopAppBarFoundation(this.adapter);
}
this.foundation.init();
};