Skip to content

Commit 236d6d4

Browse files
csmickatscott
authored andcommitted
refactor(devtools): pass node to logValue to log the appropriate prop to the console
The "Log to console" button in the prop-actions-menu component incorrectly logs the entire props object rather than the value of the individual prop with which the button is associated. Passing the `node` to the logValue function fixes the prop lookup logic and logs the appropriate prop value to the console.
1 parent 19ce90f commit 236d6d4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-pane/property-view/property-view-body/prop-actions-menu

devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-pane/property-view/property-view-body/prop-actions-menu/prop-actions-menu.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export class PropActionsMenuComponent {
150150
e.stopPropagation();
151151

152152
const node = this.node();
153-
this.controller().logValue();
153+
this.controller().logValue(node);
154154
this.snackBar.open(`Logged value of '${node.prop.name}' to the console`, 'Dismiss', {
155155
duration: 2000,
156156
horizontalPosition: 'left',

0 commit comments

Comments
 (0)