Skip to content

Commit

Permalink
fix(layout): set document dir directly (#1164)
Browse files Browse the repository at this point in the history
As pointed out https://stackoverflow.com/questions/54088021, renderer should be
used only for element.
  • Loading branch information
yggg authored and nnixaa committed Jan 25, 2019
1 parent 6484505 commit 37eaea7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/framework/theme/components/layout/layout.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,7 @@ export class NbLayoutComponent implements AfterViewInit, OnDestroy {
ngAfterViewInit() {
this.layoutDirectionService.onDirectionChange()
.pipe(takeWhile(() => this.alive))
.subscribe(direction => {
this.renderer.setProperty(this.document, 'dir', direction);
});
.subscribe(direction => this.document.dir = direction);

this.scrollService.onManualScroll()
.pipe(takeWhile(() => this.alive))
Expand Down

0 comments on commit 37eaea7

Please sign in to comment.