Commit 03add87
Fix access to constructor on xorigin object (codesandbox#3174)
**How?**
It looks like in `protocol.ts` we need to send
different params to `postMessage` if the `target`
is a `Worker`...
There's probably a more polymorphic way to handle
all of this, but this commit implements a quick
and dirty function which returns a default value
if an error is thrown (i.e. a "SecurityError" in this case)
**References:**
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Property_access_denied
- https://gitlab.com/gitlab-org/gitlab/issues/27144#note_2584605371 parent 0e722e0 commit 03add87
1 file changed
+12
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
5 | 13 | | |
6 | 14 | | |
7 | 15 | | |
| 16 | + | |
8 | 17 | | |
9 | 18 | | |
10 | 19 | | |
| |||
13 | 22 | | |
14 | 23 | | |
15 | 24 | | |
| 25 | + | |
16 | 26 | | |
17 | 27 | | |
18 | 28 | | |
| |||
91 | 101 | | |
92 | 102 | | |
93 | 103 | | |
94 | | - | |
| 104 | + | |
95 | 105 | | |
96 | 106 | | |
97 | 107 | | |
98 | | - | |
| 108 | + | |
99 | 109 | | |
100 | 110 | | |
101 | 111 | | |
| |||
0 commit comments