"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/core/vdom/helpers/normalize-scoped-slots.js" between
vue-2.6.13.tar.gz and vue-2.6.14.tar.gz

About: Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

normalize-scoped-slots.js  (vue-2.6.13):normalize-scoped-slots.js  (vue-2.6.14)
skipping to change at line 64 skipping to change at line 64
def(res, '$hasNormal', hasNormalSlots) def(res, '$hasNormal', hasNormalSlots)
return res return res
} }
function normalizeScopedSlot(normalSlots, key, fn) { function normalizeScopedSlot(normalSlots, key, fn) {
const normalized = function () { const normalized = function () {
let res = arguments.length ? fn.apply(null, arguments) : fn({}) let res = arguments.length ? fn.apply(null, arguments) : fn({})
res = res && typeof res === 'object' && !Array.isArray(res) res = res && typeof res === 'object' && !Array.isArray(res)
? [res] // single vnode ? [res] // single vnode
: normalizeChildren(res) : normalizeChildren(res)
let vnode: VNode = res && res[0] let vnode: ?VNode = res && res[0]
return res && ( return res && (
!vnode || !vnode ||
(vnode.isComment && !isAsyncPlaceholder(vnode)) // #9658, #10391 (res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode)) // #96 58, #10391
) ? undefined ) ? undefined
: res : res
} }
// this is a slot using the new v-slot syntax without scope. although it is // this is a slot using the new v-slot syntax without scope. although it is
// compiled as a scoped slot, render fn users would expect it to be present // compiled as a scoped slot, render fn users would expect it to be present
// on this.$slots because the usage is semantically a normal slot. // on this.$slots because the usage is semantically a normal slot.
if (fn.proxy) { if (fn.proxy) {
Object.defineProperty(normalSlots, key, { Object.defineProperty(normalSlots, key, {
get: normalized, get: normalized,
enumerable: true, enumerable: true,
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)