(fn)
| 63 | * @param {() => T} fn |
| 64 | */ |
| 65 | var with_parent = (fn) => { |
| 66 | if (update_version === parent_version) { |
| 67 | return fn(); |
| 68 | } |
| 69 | |
| 70 | // child source is being created after the initial proxy — |
| 71 | // prevent it from being associated with the current reaction |
| 72 | var reaction = active_reaction; |
| 73 | var version = update_version; |
| 74 | |
| 75 | set_active_reaction(null); |
| 76 | set_update_version(parent_version); |
| 77 | |
| 78 | var result = fn(); |
| 79 | |
| 80 | set_active_reaction(reaction); |
| 81 | set_update_version(version); |
| 82 | |
| 83 | return result; |
| 84 | }; |
| 85 | |
| 86 | if (is_proxied_array) { |
| 87 | // We need to create the length source eagerly to ensure that |
no test coverage detected