diff --git a/README.md b/README.md
index 5a3f576d716..ed68ab8bbbc 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@ You are looking at the repository for Vue 2. The repo for Vue 3 is [vuejs/core](
Vue.js is an MIT-licensed open source project with its ongoing development made possible entirely by the support of these awesome [backers](https://github.com/vuejs/core/blob/main/BACKERS.md). If you'd like to join them, please consider [ sponsor Vue's development](https://vuejs.org/sponsor/).
-
+
diff --git a/examples/todomvc/app.js b/examples/todomvc/app.js
index f8bfeb1ea61..7a1a65486a3 100644
--- a/examples/todomvc/app.js
+++ b/examples/todomvc/app.js
@@ -55,7 +55,7 @@ var app = new Vue({
},
// computed properties
- // https://vuejs.org/guide/computed.html
+ // https://v2.vuejs.org/v2/guide/computed.html
computed: {
filteredTodos: function () {
return filters[this.visibility](this.todos)
@@ -129,7 +129,7 @@ var app = new Vue({
// a custom directive to wait for the DOM to be updated
// before focusing on the input field.
- // https://vuejs.org/guide/custom-directive.html
+ // https://v2.vuejs.org/v2/guide/custom-directive.html
directives: {
'todo-focus': function (el, binding) {
if (binding.value) {
diff --git a/packages/vue-server-renderer/build.dev.js b/packages/vue-server-renderer/build.dev.js
index 8235936b2bd..f4a575aba89 100644
--- a/packages/vue-server-renderer/build.dev.js
+++ b/packages/vue-server-renderer/build.dev.js
@@ -5157,7 +5157,7 @@ function genFor (
state.warn(
"<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " +
"v-for should have explicit keys. " +
- "See https://vuejs.org/guide/list.html#key for more info.",
+ "See https://v2.vuejs.org/v2/guide/list.html#Maintaining-State for more info.",
el.rawAttrsMap['v-for'],
true /* tip */
);
diff --git a/packages/vue-template-compiler/browser.js b/packages/vue-template-compiler/browser.js
index 92d3b5d913a..6ffad539827 100644
--- a/packages/vue-template-compiler/browser.js
+++ b/packages/vue-template-compiler/browser.js
@@ -4444,7 +4444,7 @@
state.warn(
"<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " +
"v-for should have explicit keys. " +
- "See https://vuejs.org/guide/list.html#key for more info.",
+ "See https://v2.vuejs.org/v2/guide/list.html#Maintaining-State for more info.",
el.rawAttrsMap['v-for'],
true /* tip */
);
diff --git a/packages/weex-template-compiler/build.js b/packages/weex-template-compiler/build.js
index 68976949e79..ba0e498cbc6 100644
--- a/packages/weex-template-compiler/build.js
+++ b/packages/weex-template-compiler/build.js
@@ -3489,7 +3489,7 @@ function genFor (
state.warn(
"<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " +
"v-for should have explicit keys. " +
- "See https://vuejs.org/guide/list.html#key for more info.",
+ "See https://v2.vuejs.org/v2/guide/list.html#Maintaining-State for more info.",
el.rawAttrsMap['v-for'],
true /* tip */
);
diff --git a/packages/weex-vue-framework/factory.js b/packages/weex-vue-framework/factory.js
index 4cb547b5250..6fad6da8755 100644
--- a/packages/weex-vue-framework/factory.js
+++ b/packages/weex-vue-framework/factory.js
@@ -2010,7 +2010,7 @@ if (process.env.NODE_ENV !== 'production') {
'referenced during render. Make sure that this property is reactive, ' +
'either in the data option, or for class-based components, by ' +
'initializing the property. ' +
- 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
+ 'See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties',
target
);
};
@@ -2020,7 +2020,7 @@ if (process.env.NODE_ENV !== 'production') {
"Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
'prevent conflicts with Vue internals. ' +
- 'See: https://vuejs.org/v2/api/#data',
+ 'See: https://v2.vuejs.org/v2/api/#data',
target
);
};
@@ -4900,7 +4900,7 @@ function initData (vm) {
data = {};
process.env.NODE_ENV !== 'production' && warn(
'data functions should return an object:\n' +
- 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
+ 'https://v2.vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
vm
);
}
diff --git a/src/compiler/codegen/index.js b/src/compiler/codegen/index.js
index acb3ca9118c..cb6d1f9f1e6 100644
--- a/src/compiler/codegen/index.js
+++ b/src/compiler/codegen/index.js
@@ -204,7 +204,7 @@ export function genFor (
state.warn(
`<${el.tag} v-for="${alias} in ${exp}">: component lists rendered with ` +
`v-for should have explicit keys. ` +
- `See https://vuejs.org/guide/list.html#key for more info.`,
+ `See https://v2.vuejs.org/v2/guide/list.html#Maintaining-State for more info.`,
el.rawAttrsMap['v-for'],
true /* tip */
)
diff --git a/src/core/instance/proxy.js b/src/core/instance/proxy.js
index b1884f7118c..74c19cf601a 100644
--- a/src/core/instance/proxy.js
+++ b/src/core/instance/proxy.js
@@ -19,7 +19,7 @@ if (process.env.NODE_ENV !== 'production') {
'referenced during render. Make sure that this property is reactive, ' +
'either in the data option, or for class-based components, by ' +
'initializing the property. ' +
- 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
+ 'See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties',
target
)
}
@@ -29,7 +29,7 @@ if (process.env.NODE_ENV !== 'production') {
`Property "${key}" must be accessed with "$data.${key}" because ` +
'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
'prevent conflicts with Vue internals. ' +
- 'See: https://vuejs.org/v2/api/#data',
+ 'See: https://v2.vuejs.org/v2/api/#data',
target
)
}
diff --git a/src/core/instance/state.js b/src/core/instance/state.js
index 64d03649121..edcb13167e7 100644
--- a/src/core/instance/state.js
+++ b/src/core/instance/state.js
@@ -119,7 +119,7 @@ function initData (vm: Component) {
data = {}
process.env.NODE_ENV !== 'production' && warn(
'data functions should return an object:\n' +
- 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
+ 'https://v2.vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
vm
)
}
diff --git a/src/core/vdom/helpers/normalize-scoped-slots.js b/src/core/vdom/helpers/normalize-scoped-slots.js
index 13df231f43c..b21c0b67cbf 100644
--- a/src/core/vdom/helpers/normalize-scoped-slots.js
+++ b/src/core/vdom/helpers/normalize-scoped-slots.js
@@ -64,7 +64,7 @@ function normalizeScopedSlot(normalSlots, key, fn) {
let vnode: ?VNode = res && res[0]
return res && (
!vnode ||
- (res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode)) // #9658, #10391
+ (res.every(r => r.isComment) && !isAsyncPlaceholder(vnode)) // #9658, #10391, #11856
) ? undefined
: res
}
diff --git a/src/platforms/web/runtime/index.js b/src/platforms/web/runtime/index.js
index fe29b22aeb1..fa645696533 100644
--- a/src/platforms/web/runtime/index.js
+++ b/src/platforms/web/runtime/index.js
@@ -67,7 +67,7 @@ if (inBrowser) {
console[console.info ? 'info' : 'log'](
`You are running Vue in development mode.\n` +
`Make sure to turn on production mode when deploying for production.\n` +
- `See more tips at https://vuejs.org/guide/deployment.html`
+ `See more tips at https://v2.vuejs.org/v2/guide/deployment.html`
)
}
}, 0)
diff --git a/test/unit/features/component/component-scoped-slot.spec.js b/test/unit/features/component/component-scoped-slot.spec.js
index a77b055ccd6..6355739a2fe 100644
--- a/test/unit/features/component/component-scoped-slot.spec.js
+++ b/test/unit/features/component/component-scoped-slot.spec.js
@@ -1294,6 +1294,19 @@ describe('Component scoped slot', () => {
expect(vm.$el.textContent).toMatch('fallback')
})
+ //#11856
+ it('fallback for scoped slot with multiple v-if', () => {
+ const vm = new Vue({
+ template: `hihi2`,
+ components: {
+ Test: {
+ template: `fallback
`
+ }
+ }
+ }).$mount()
+ expect(vm.$el.textContent).toEqual('fallback')
+ })
+
// #9699
// Component only has normal slots, but is passing down $scopedSlots directly
// $scopedSlots should not be marked as stable in this case