mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(devtools): fix regression that broke assignment of selected node to $ng0 variable (rangle/angular-devtools#89)
This commit is contained in:
committed by
GitHub
parent
c5e633b8a3
commit
dd977f4b26
@@ -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;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user