Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume committed Nov 22, 2018
1 parent 29ac95f commit 8c03623
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export class TreeSelectItemComponent {
}

public get haveChildren(): boolean {
if(this.restructureWhenChildSameName && this.item && this.item.children && this.item.children.length == 1 && this.item.text == this.item.children[0].text)
{
if (this.restructureWhenChildSameName && this.item && this.item.children
&& this.item.children.length === 1 && this.item.text === this.item.children[0].text) {
this.item = this.item.children[0];
}
return this.item && this.item.children && this.item.children.length > 0;
Expand Down
3 changes: 1 addition & 2 deletions src/ngx-tree-select/src/components/tree-select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ export class TreeSelectComponent implements ControlValueAccessor {
return this.svc.Configuration.allowParentSelection;
}


@Input()
public set restructureWhenChildSameName(value: boolean){
public set restructureWhenChildSameName(value: boolean) {
this.svc.setConfiguration((opt) => opt.restructureWhenChildSameName = value, true);
}

Expand Down

0 comments on commit 8c03623

Please sign in to comment.