Commit d122bd1
committed
Fix detection of Backspace and Delay elements
Previously, during `extractTextFromElement` and `cloneElementWithSpecifiedTextAtIndex`,
the code would try to determine if an element it was visiting was a
`Backspace` or a `Delay` element by checking `element.type.name`. This
worked fine most of the time, but if the code was minified,
`element.type.name` was no longer `Backspace` or `Delay` because the
name of those Components had been changed after minification.
In order to fix this, check the reference to the type (`element.type`) instead of
checking `element.type.name`1 parent 85a5698 commit d122bd1
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
| |||
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | | - | |
42 | | - | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
88 | | - | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
0 commit comments