Skip to content

Commit

Permalink
build: build 2.6.9
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Mar 14, 2019
1 parent f1bdd7f commit 5bffed0
Show file tree
Hide file tree
Showing 19 changed files with 300 additions and 194 deletions.
54 changes: 34 additions & 20 deletions dist/vue.common.dev.js
@@ -1,5 +1,5 @@
/*!
* Vue.js v2.6.8
* Vue.js v2.6.9
* (c) 2014-2019 Evan You
* Released under the MIT License.
*/
Expand Down Expand Up @@ -1857,10 +1857,11 @@ function invokeWithErrorHandling (
var res;
try {
res = args ? handler.apply(context, args) : handler.call(context);
if (res && !res._isVue && isPromise(res)) {
if (res && !res._isVue && isPromise(res) && !res._handled) {
res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
// issue #9511
// reassign to res to avoid catch triggering multiple times when nested calls
res = res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
// avoid catch triggering multiple times when nested calls
res._handled = true;
}
} catch (e) {
handleError(e, vm, info);
Expand Down Expand Up @@ -2544,6 +2545,7 @@ function normalizeScopedSlots (
) {
var res;
var isStable = slots ? !!slots.$stable : true;
var hasNormalSlots = Object.keys(normalSlots).length > 0;
var key = slots && slots.$key;
if (!slots) {
res = {};
Expand All @@ -2555,7 +2557,8 @@ function normalizeScopedSlots (
prevSlots &&
prevSlots !== emptyObject &&
key === prevSlots.$key &&
Object.keys(normalSlots).length === 0
!hasNormalSlots &&
!prevSlots.$hasNormal
) {
// fast path 2: stable scoped slots w/ no normal slots to proxy,
// only need to normalize once
Expand All @@ -2581,6 +2584,7 @@ function normalizeScopedSlots (
}
def(res, '$stable', isStable);
def(res, '$key', key);
def(res, '$hasNormal', hasNormalSlots);
return res
}

Expand All @@ -2590,8 +2594,10 @@ function normalizeScopedSlot(normalSlots, key, fn) {
res = res && typeof res === 'object' && !Array.isArray(res)
? [res] // single vnode
: normalizeChildren(res);
return res && res.length === 0
? undefined
return res && (
res.length === 0 ||
(res.length === 1 && res[0].isComment) // #9658
) ? undefined
: res
};
// this is a slot using the new v-slot syntax without scope. although it is
Expand Down Expand Up @@ -2771,12 +2777,13 @@ function bindObjectProps (
: data.attrs || (data.attrs = {});
}
var camelizedKey = camelize(key);
if (!(key in hash) && !(camelizedKey in hash)) {
var hyphenatedKey = hyphenate(key);
if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
hash[key] = value[key];

if (isSync) {
var on = data.on || (data.on = {});
on[("update:" + camelizedKey)] = function ($event) {
on[("update:" + key)] = function ($event) {
value[key] = $event;
};
}
Expand Down Expand Up @@ -3611,7 +3618,7 @@ function resolveAsyncComponent (
}

var owner = currentRenderingInstance;
if (isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
// already pending
factory.owners.push(owner);
}
Expand All @@ -3620,7 +3627,7 @@ function resolveAsyncComponent (
return factory.loadingComp
}

if (!isDef(factory.owners)) {
if (owner && !isDef(factory.owners)) {
var owners = factory.owners = [owner];
var sync = true

Expand Down Expand Up @@ -4235,10 +4242,15 @@ var getNow = Date.now;
// timestamp can either be hi-res (relative to page load) or low-res
// (relative to UNIX epoch), so in order to compare time we have to use the
// same timestamp type when saving the flush timestamp.
if (inBrowser && getNow() > document.createEvent('Event').timeStamp) {
// if the low-res timestamp which is bigger than the event timestamp
// (which is evaluated AFTER) it means the event is using a hi-res timestamp,
// and we need to use the hi-res version for event listeners as well.
if (
inBrowser &&
window.performance &&
typeof performance.now === 'function' &&
document.createEvent('Event').timeStamp <= performance.now()
) {
// if the event timestamp is bigger than the hi-res timestamp
// (which is evaluated AFTER) it means the event is using a lo-res timestamp,
// and we need to use the lo-res version for event listeners as well.
getNow = function () { return performance.now(); };
}

Expand Down Expand Up @@ -5404,7 +5416,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
value: FunctionalRenderContext
});

Vue.version = '2.6.8';
Vue.version = '2.6.9';

/* */

Expand Down Expand Up @@ -7496,8 +7508,10 @@ function add$1 (
e.target === e.currentTarget ||
// event is fired after handler attachment
e.timeStamp >= attachedTimestamp ||
// #9462 bail for iOS 9 bug: event.timeStamp is 0 after history.pushState
e.timeStamp === 0 ||
// bail for environments that have buggy event.timeStamp implementations
// #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState
// #9681 QtWebEngine event.timeStamp is negative value
e.timeStamp <= 0 ||
// #9448 bail if event is fired in another document in a multi-page
// electron/nw.js app, since event.timeStamp will be using a different
// starting reference
Expand Down Expand Up @@ -8115,8 +8129,8 @@ function enter (vnode, toggleDisplay) {
var context = activeInstance;
var transitionNode = activeInstance.$vnode;
while (transitionNode && transitionNode.parent) {
transitionNode = transitionNode.parent;
context = transitionNode.context;
transitionNode = transitionNode.parent;
}

var isAppear = !context._isMounted || !vnode.isRootInsert;
Expand Down Expand Up @@ -9823,7 +9837,7 @@ function parse (
text = preserveWhitespace ? ' ' : '';
}
if (text) {
if (whitespaceOption === 'condense') {
if (!inPre && whitespaceOption === 'condense') {
// condense consecutive whitespaces into single space
text = text.replace(whitespaceRE$1, ' ');
}
Expand Down
4 changes: 2 additions & 2 deletions dist/vue.common.prod.js

Large diffs are not rendered by default.

54 changes: 34 additions & 20 deletions dist/vue.esm.browser.js
@@ -1,5 +1,5 @@
/*!
* Vue.js v2.6.8
* Vue.js v2.6.9
* (c) 2014-2019 Evan You
* Released under the MIT License.
*/
Expand Down Expand Up @@ -1888,10 +1888,11 @@ function invokeWithErrorHandling (
let res;
try {
res = args ? handler.apply(context, args) : handler.call(context);
if (res && !res._isVue && isPromise(res)) {
if (res && !res._isVue && isPromise(res) && !res._handled) {
res.catch(e => handleError(e, vm, info + ` (Promise/async)`));
// issue #9511
// reassign to res to avoid catch triggering multiple times when nested calls
res = res.catch(e => handleError(e, vm, info + ` (Promise/async)`));
// avoid catch triggering multiple times when nested calls
res._handled = true;
}
} catch (e) {
handleError(e, vm, info);
Expand Down Expand Up @@ -2572,6 +2573,7 @@ function normalizeScopedSlots (
) {
let res;
const isStable = slots ? !!slots.$stable : true;
const hasNormalSlots = Object.keys(normalSlots).length > 0;
const key = slots && slots.$key;
if (!slots) {
res = {};
Expand All @@ -2583,7 +2585,8 @@ function normalizeScopedSlots (
prevSlots &&
prevSlots !== emptyObject &&
key === prevSlots.$key &&
Object.keys(normalSlots).length === 0
!hasNormalSlots &&
!prevSlots.$hasNormal
) {
// fast path 2: stable scoped slots w/ no normal slots to proxy,
// only need to normalize once
Expand All @@ -2609,6 +2612,7 @@ function normalizeScopedSlots (
}
def(res, '$stable', isStable);
def(res, '$key', key);
def(res, '$hasNormal', hasNormalSlots);
return res
}

Expand All @@ -2618,8 +2622,10 @@ function normalizeScopedSlot(normalSlots, key, fn) {
res = res && typeof res === 'object' && !Array.isArray(res)
? [res] // single vnode
: normalizeChildren(res);
return res && res.length === 0
? undefined
return res && (
res.length === 0 ||
(res.length === 1 && res[0].isComment) // #9658
) ? undefined
: res
};
// this is a slot using the new v-slot syntax without scope. although it is
Expand Down Expand Up @@ -2799,12 +2805,13 @@ function bindObjectProps (
: data.attrs || (data.attrs = {});
}
const camelizedKey = camelize(key);
if (!(key in hash) && !(camelizedKey in hash)) {
const hyphenatedKey = hyphenate(key);
if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
hash[key] = value[key];

if (isSync) {
const on = data.on || (data.on = {});
on[`update:${camelizedKey}`] = function ($event) {
on[`update:${key}`] = function ($event) {
value[key] = $event;
};
}
Expand Down Expand Up @@ -3632,7 +3639,7 @@ function resolveAsyncComponent (
}

const owner = currentRenderingInstance;
if (isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
// already pending
factory.owners.push(owner);
}
Expand All @@ -3641,7 +3648,7 @@ function resolveAsyncComponent (
return factory.loadingComp
}

if (!isDef(factory.owners)) {
if (owner && !isDef(factory.owners)) {
const owners = factory.owners = [owner];
let sync = true

Expand Down Expand Up @@ -4256,10 +4263,15 @@ let getNow = Date.now;
// timestamp can either be hi-res (relative to page load) or low-res
// (relative to UNIX epoch), so in order to compare time we have to use the
// same timestamp type when saving the flush timestamp.
if (inBrowser && getNow() > document.createEvent('Event').timeStamp) {
// if the low-res timestamp which is bigger than the event timestamp
// (which is evaluated AFTER) it means the event is using a hi-res timestamp,
// and we need to use the hi-res version for event listeners as well.
if (
inBrowser &&
window.performance &&
typeof performance.now === 'function' &&
document.createEvent('Event').timeStamp <= performance.now()
) {
// if the event timestamp is bigger than the hi-res timestamp
// (which is evaluated AFTER) it means the event is using a lo-res timestamp,
// and we need to use the lo-res version for event listeners as well.
getNow = () => performance.now();
}

Expand Down Expand Up @@ -5435,7 +5447,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
value: FunctionalRenderContext
});

Vue.version = '2.6.8';
Vue.version = '2.6.9';

/* */

Expand Down Expand Up @@ -7519,8 +7531,10 @@ function add$1 (
e.target === e.currentTarget ||
// event is fired after handler attachment
e.timeStamp >= attachedTimestamp ||
// #9462 bail for iOS 9 bug: event.timeStamp is 0 after history.pushState
e.timeStamp === 0 ||
// bail for environments that have buggy event.timeStamp implementations
// #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState
// #9681 QtWebEngine event.timeStamp is negative value
e.timeStamp <= 0 ||
// #9448 bail if event is fired in another document in a multi-page
// electron/nw.js app, since event.timeStamp will be using a different
// starting reference
Expand Down Expand Up @@ -8137,8 +8151,8 @@ function enter (vnode, toggleDisplay) {
let context = activeInstance;
let transitionNode = activeInstance.$vnode;
while (transitionNode && transitionNode.parent) {
transitionNode = transitionNode.parent;
context = transitionNode.context;
transitionNode = transitionNode.parent;
}

const isAppear = !context._isMounted || !vnode.isRootInsert;
Expand Down Expand Up @@ -9840,7 +9854,7 @@ function parse (
text = preserveWhitespace ? ' ' : '';
}
if (text) {
if (whitespaceOption === 'condense') {
if (!inPre && whitespaceOption === 'condense') {
// condense consecutive whitespaces into single space
text = text.replace(whitespaceRE$1, ' ');
}
Expand Down
4 changes: 2 additions & 2 deletions dist/vue.esm.browser.min.js

Large diffs are not rendered by default.

0 comments on commit 5bffed0

Please sign in to comment.