-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maximum call stack size exceeded in SSR with a v-for with 1000 components #8545
Labels
Comments
I've found that But as you can see noted below, a recursive call still remains. (break indents intentionally to illustrate the strategy) --- src/server/render-context.js.old 2018-10-01 14:29:09.647066000 +0900
+++ src/server/render-context.js 2018-10-01 14:37:53.207549000 +0900
@@ -66,6 +66,7 @@
}
next () {
+ while (true) {
const lastState = this.renderStates[this.renderStates.length - 1]
if (isUndef(lastState)) {
return this.done()
@@ -81,15 +82,14 @@
this.renderStates.pop()
if (lastState.type === 'Element') {
this.write(lastState.endTag, this.next)
- } else {
- this.next()
+ // a recursive call still remains here
+ return
}
}
break
case 'Component':
this.renderStates.pop()
this.activeInstance = lastState.prevActive
- this.next()
break
case 'ComponentWithCache':
this.renderStates.pop()
@@ -112,9 +112,9 @@
}
buffer.length = bufferIndex
componentBuffer.length = bufferIndex
- this.next()
break
}
+ }
}
}
|
f2009
pushed a commit
to f2009/vue
that referenced
this issue
Jan 25, 2019
aJean
pushed a commit
to aJean/vue
that referenced
this issue
Aug 19, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
2.5.16
Reproduction link
https://github.com/vuejs/vue
Steps to reproduce
Sorry I failed to visit gist or other online code share platforms.
Just run the following script with Node@8.9.0 and Vue@2.5.16 installed. But in Node@6, it is ok.
What is expected?
Output the html.
What is actually happening?
Someone used to mention this bug but without reproduction, #5445.
The text was updated successfully, but these errors were encountered: