Commit b9d47b1
Rose Robertson
Fix bug when user pastes non-string
I don’t know how people manage to get non-strings into their clipboard but I was seeing a bunch of errors in sentry "length of undefined" and tracked it down to this plugin.
To re-create on mac
1. Open terminal, execute following command: `pbcopy < /dev/null`
2. Paste in a draft editor that uses this plugin
3. You will see an error in your console
Fix is to early-return if `text` has no value, instead of trying to loop through it.1 parent 53b91a0 commit b9d47b1
2 files changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
382 | 390 | | |
383 | 391 | | |
384 | 392 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
152 | 157 | | |
153 | 158 | | |
154 | 159 | | |
| |||
0 commit comments