Skip to content

Commit

Permalink
fix(selection): fix className breaking on svg elements
Browse files Browse the repository at this point in the history
  • Loading branch information
crimx committed Apr 18, 2018
1 parent 0be395c commit f932de3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/selection/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const validMouseup$$ = fromEvent<MouseEvent>(window, 'mouseup', true).pipe(
filter(({ target }) => (
config.active &&
window.name !== 'saladict-frame' &&
(!target || !target['className'] || !target['className'].startsWith('saladict-'))
(!target || typeof target['className'] !== 'string' || !target['className'].startsWith('saladict-'))
)),
// if user click on a selected text,
// getSelection would reture the text before the highlight disappears
Expand Down

0 comments on commit f932de3

Please sign in to comment.