Skip to content

Commit

Permalink
dead logic
Browse files Browse the repository at this point in the history
Co-authored-by: Flavien DELANGLE <flaviendelangle@gmail.com>
Signed-off-by: Olivier Tassinari <olivier.tassinari@gmail.com>
  • Loading branch information
oliviertassinari and flaviendelangle authored Feb 20, 2024
1 parent 4bc1b4b commit 1cc1bfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/modules/utils/CodeCopy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export function CodeCopyProvider({ children }: CodeCopyProviderProps) {
}

const copyBtn = rootNode.current.querySelector('.MuiCode-copy') as HTMLButtonElement;
const initialEventAction = copyBtn!.getAttribute('data-ga-event-action');
const initialEventAction = copyBtn.getAttribute('data-ga-event-action');
// update the 'data-ga-event-action' on the button to track keyboard interaction
copyBtn.dataset.gaEventAction =
initialEventAction?.replace('click', 'keyboard') || 'copy-keyboard';
Expand Down

0 comments on commit 1cc1bfb

Please sign in to comment.