Skip to content

Commit d90e322

Browse files
committed
Merge pull request #22 from sfdc-matrix/fix-empty-footer
Fix Empty Footer
2 parents 4bb25c3 + 10dd5df commit d90e322

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

components/SLDSModal/index.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,16 @@ module.exports = React.createClass( {
164164
},
165165

166166
footerComponent() {
167+
let footer;
168+
167169
const footerClass = {
168170
'slds-modal__footer': true,
169171
'slds-modal__footer--directional': this.props.directional
170172
};
171173

172-
let footer;
174+
const hasFooter = this.props.footer && this.props.footer.length > 0;
173175

174-
if (!this.isPrompt()) {
176+
if (!this.isPrompt() && hasFooter ) {
175177
footer = (<div className={cx(footerClass)}>{this.props.footer}</div>);
176178
}
177179

0 commit comments

Comments
 (0)