Skip to content

Commit 5bf144d

Browse files
committed
fix(*): remove lodash 'get'
1 parent 8e8477d commit 5bf144d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/tree-internal.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { NodeEditableEvent, NodeEditableEventAction } from './editable/editable.
88
import { TreeService } from './tree.service';
99
import * as EventUtils from './utils/event.utils';
1010
import { NodeDraggableEvent } from './draggable/draggable.events';
11-
import * as _get from 'lodash/get';
1211
import { Subscription } from 'rxjs/Subscription';
12+
import { get } from './utils/fn.utils';
1313

1414
@Component({
1515
selector: 'tree-internal',
@@ -75,7 +75,7 @@ export class TreeInternalComponent implements OnInit, OnDestroy {
7575

7676
public ngOnInit(): void {
7777
this.controller = new TreeController(this);
78-
if (_get(this.tree, 'node.id', '')) {
78+
if (get(this.tree, 'node.id', '')) {
7979
this.treeService.setController(this.tree.node.id, this.controller);
8080
}
8181

@@ -103,7 +103,7 @@ export class TreeInternalComponent implements OnInit, OnDestroy {
103103
}
104104

105105
public ngOnDestroy(): void {
106-
if (_get(this.tree, 'node.id', '')) {
106+
if (get(this.tree, 'node.id', '')) {
107107
this.treeService.deleteController(this.tree.node.id);
108108
}
109109

@@ -192,7 +192,7 @@ export class TreeInternalComponent implements OnInit, OnDestroy {
192192
}
193193

194194
private onRemoveSelected(): void {
195-
this.treeService.deleteController(_get(this.tree, 'node.id', ''));
195+
this.treeService.deleteController(get(this.tree, 'node.id', ''));
196196
this.treeService.fireNodeRemoved(this.tree);
197197
}
198198

0 commit comments

Comments
 (0)