Skip to content
Bug reportSep 5, 2026· 0:17· 15 views

Vue 3: Set#intersection / union / difference throw on reactive Sets (Proxy brand-check failure)

0:17 total

Comments · 0

Be the first to comment.

Bug report— by SceneRecap AI

mediumreactivity
app: Vue SFC Playgroundvue_version: @d105e19typescript_version: 6.0.3

Repro steps

  1. 1.Open Vue SFC Playground with reactive Set refs (e.g. `const mySet = ref(new Set([1, 2, 3]))` and `const anotherSet = ref(new Set([2, 3, 4]))`).
  2. 2.Click the 'Proxy(mySet), Proxy(anotherSet)' button to execute `mySet.value.intersection(anotherSet.value)`.
  3. 3.Toggle 'Show Error' on to observe the runtime exception banner.

Expected

Calling new ECMAScript Set methods like `Set.prototype.intersection()` on a reactive Set proxy should succeed and return the intersected Set.

Actual

A TypeError is thrown: 'Method Set.prototype.intersection called on incompatible receiver #<Set>'.

Evidence

consoleTypeError: Method Set.prototype.intersection called on incompatible receiver #<Set> at Proxy.intersection (<anonymous>) at Proxy.getIntersection (<anonymous>:29:32)
visualError toast notification displays 'Method Set.prototype.intersection called on incompatible receiver #<Set>' at the bottom right of the preview pane.
Issue markdown (copy-paste ready)
### Description
When invoking new Set prototype methods (such as `Set.prototype.intersection()`) directly on Vue reactive `Set` proxies created via `ref()` or `reactive()`, JavaScript engine brand-checks fail, throwing `TypeError: Method Set.prototype.intersection called on incompatible receiver #<Set>`.

### Steps to Reproduce
1. Open Vue SFC Playground (Vue `@d105e19`).
2. Create reactive Set refs: `const mySet = ref(new Set([1, 2, 3]))` and `const anotherSet = ref(new Set([2, 3, 4]))`.
3. Execute `mySet.value.intersection(anotherSet.value)` (click 'Proxy(mySet), Proxy(anotherSet)').
4. Enable 'Show Error' toggle to view the caught runtime exception.

### Expected Behavior
`Set.prototype.intersection` should execute on the underlying raw Set or instrumented receiver and return the intersection Set.

### Actual Behavior
A runtime error is raised:
`TypeError: Method Set.prototype.intersection called on incompatible receiver #<Set>`

*Recorded with SceneRecap.*

Your recordings could explain themselves too.

Free plan · silent recordings welcome · bug reports included.

Try SceneRecap free →
Vue 3: Set#intersection / union / difference throw on reactive Sets (Proxy brand-check failure) · SceneRecap