Skip to content

Commit

Permalink
fix(*): remove lodash 'get'
Browse files Browse the repository at this point in the history
  • Loading branch information
rychkog committed Aug 27, 2017
1 parent 8e8477d commit 5bf144d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tree-internal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { NodeEditableEvent, NodeEditableEventAction } from './editable/editable.
import { TreeService } from './tree.service';
import * as EventUtils from './utils/event.utils';
import { NodeDraggableEvent } from './draggable/draggable.events';
import * as _get from 'lodash/get';
import { Subscription } from 'rxjs/Subscription';
import { get } from './utils/fn.utils';

@Component({
selector: 'tree-internal',
Expand Down Expand Up @@ -75,7 +75,7 @@ export class TreeInternalComponent implements OnInit, OnDestroy {

public ngOnInit(): void {
this.controller = new TreeController(this);
if (_get(this.tree, 'node.id', '')) {
if (get(this.tree, 'node.id', '')) {
this.treeService.setController(this.tree.node.id, this.controller);
}

Expand Down Expand Up @@ -103,7 +103,7 @@ export class TreeInternalComponent implements OnInit, OnDestroy {
}

public ngOnDestroy(): void {
if (_get(this.tree, 'node.id', '')) {
if (get(this.tree, 'node.id', '')) {
this.treeService.deleteController(this.tree.node.id);
}

Expand Down Expand Up @@ -192,7 +192,7 @@ export class TreeInternalComponent implements OnInit, OnDestroy {
}

private onRemoveSelected(): void {
this.treeService.deleteController(_get(this.tree, 'node.id', ''));
this.treeService.deleteController(get(this.tree, 'node.id', ''));
this.treeService.fireNodeRemoved(this.tree);
}

Expand Down

0 comments on commit 5bf144d

Please sign in to comment.