Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Commit

Permalink
fix(flexbox): add default display property to getDisplayStyle() (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwiens authored and kara committed Jun 12, 2017
1 parent 0131103 commit 771f2c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/flexbox/api/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export abstract class BaseFxDirective implements OnDestroy, OnChanges {
protected _getDisplayStyle(source?: HTMLElement): string {
let element: HTMLElement = source || this._elementRef.nativeElement;
let value = (element.style as any)['display'] || getComputedStyle(element)['display'];
return value.trim();
return value ? value.trim() : 'block';
}

protected _getFlowDirection(target: any, addIfMissing = false): string {
Expand Down

1 comment on commit 771f2c9

@ThomasBurleson
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with SHA 635c4f5

Please sign in to comment.