Commit 2dd6340
Fix getComputedStyle TypeError by adding DOM Element check
- Add nodeType check to ensure original is a DOM Element before calling getComputedStyle
- Prevents TypeError when non-Element objects are passed to serializeOpacity
- Uses nodeType === 1 to check for Element nodes (more compatible than instanceof)1 parent 12a8af6 commit 2dd6340
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
29 | | - | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
0 commit comments