mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
fix(devtools): fix regression that broke assignment of selected node to $ng0 variable (rangle/angular-devtools#89)
This commit is contained in:
parent
c5e633b8a3
commit
dd977f4b26
1 changed files with 1 additions and 3 deletions
|
|
@ -8,9 +8,7 @@ export const setConsoleReference = (node: ComponentTreeNode) => {
|
|||
Object.defineProperty(window, SELECTED_COMPONENT_PROPERTY_KEY_BASE, {
|
||||
get: () => {
|
||||
if (node) {
|
||||
return (
|
||||
(node instanceof HTMLElement && ng.getComponent(node.nativeElement)) || ng.getDebugNode(node.nativeElement)
|
||||
);
|
||||
return ng.getComponent(node.nativeElement) || node;
|
||||
}
|
||||
return node.nativeElement;
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue