Composition-api: "Maximum call stack size exceeded" in unwrapRefProxy

Created on 12 Jun 2020  路  4Comments  路  Source: vuejs/composition-api

RangeError: Maximum call stack size exceeded
    at unwrapRefProxy (vue-composition-api.module.js?750b:657)
    at _loop_1 (vue-composition-api.module.js?750b:648)
    at unwrapRefProxy (vue-composition-api.module.js?750b:654)
    at _loop_1 (vue-composition-api.module.js?750b:648)
    at unwrapRefProxy (vue-composition-api.module.js?750b:654)
    at _loop_1 (vue-composition-api.module.js?750b:648)
    at unwrapRefProxy (vue-composition-api.module.js?750b:654)
    at _loop_1 (vue-composition-api.module.js?750b:648)
    at unwrapRefProxy (vue-composition-api.module.js?750b:654)
    at _loop_1 (vue-composition-api.module.js?750b:648)

https://github.com/vuejs/composition-api/blob/8c449c1a2494c4fdad51490073167766f9cd38af/src/reactivity/unwrap.ts#L5-L38
Changing this func like below will fix this error. (refs #361)

export function unwrapRefProxy(value: any) {
  return value
}
has PR

Most helpful comment

I will PR it in a bit

All 4 comments

Looks like the object you passed to setup has cycle. You may also want to make sure if it's expected.

/cc @pikax should we keep a "traveled list"?

Oh, exactly it was so. (checked by passing object to JSON.stringify)

TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'Vue'
    |     property '$options' -> object with constructor 'Object'
    |     property 'router' -> object with constructor 'VueRouter'
    --- property 'app' closes the circle

This object may be SetupContext.

I will PR it in a bit

Was this page helpful?
0 / 5 - 0 ratings

Related issues

banricho picture banricho  路  3Comments

zzachattack2 picture zzachattack2  路  3Comments

SJanJan picture SJanJan  路  3Comments

kwanjas3 picture kwanjas3  路  4Comments

rchaser53 picture rchaser53  路  4Comments