1
1
/*!
2
- * Vue.js v2.6.8
2
+ * Vue.js v2.6.9
3
3
* (c) 2014-2019 Evan You
4
4
* Released under the MIT License.
5
5
*/
@@ -1857,10 +1857,11 @@ function invokeWithErrorHandling (
1857
1857
var res ;
1858
1858
try {
1859
1859
res = args ? handler . apply ( context , args ) : handler . call ( context ) ;
1860
- if ( res && ! res . _isVue && isPromise ( res ) ) {
1860
+ if ( res && ! res . _isVue && isPromise ( res ) && ! res . _handled ) {
1861
+ res . catch ( function ( e ) { return handleError ( e , vm , info + " (Promise/async)" ) ; } ) ;
1861
1862
// issue #9511
1862
- // reassign to res to avoid catch triggering multiple times when nested calls
1863
- res = res . catch ( function ( e ) { return handleError ( e , vm , info + " (Promise/async)" ) ; } ) ;
1863
+ // avoid catch triggering multiple times when nested calls
1864
+ res . _handled = true ;
1864
1865
}
1865
1866
} catch ( e ) {
1866
1867
handleError ( e , vm , info ) ;
@@ -2544,6 +2545,7 @@ function normalizeScopedSlots (
2544
2545
) {
2545
2546
var res ;
2546
2547
var isStable = slots ? ! ! slots . $stable : true ;
2548
+ var hasNormalSlots = Object . keys ( normalSlots ) . length > 0 ;
2547
2549
var key = slots && slots . $key ;
2548
2550
if ( ! slots ) {
2549
2551
res = { } ;
@@ -2555,7 +2557,8 @@ function normalizeScopedSlots (
2555
2557
prevSlots &&
2556
2558
prevSlots !== emptyObject &&
2557
2559
key === prevSlots . $key &&
2558
- Object . keys ( normalSlots ) . length === 0
2560
+ ! hasNormalSlots &&
2561
+ ! prevSlots . $hasNormal
2559
2562
) {
2560
2563
// fast path 2: stable scoped slots w/ no normal slots to proxy,
2561
2564
// only need to normalize once
@@ -2581,6 +2584,7 @@ function normalizeScopedSlots (
2581
2584
}
2582
2585
def ( res , '$stable' , isStable ) ;
2583
2586
def ( res , '$key' , key ) ;
2587
+ def ( res , '$hasNormal' , hasNormalSlots ) ;
2584
2588
return res
2585
2589
}
2586
2590
@@ -2590,8 +2594,10 @@ function normalizeScopedSlot(normalSlots, key, fn) {
2590
2594
res = res && typeof res === 'object' && ! Array . isArray ( res )
2591
2595
? [ res ] // single vnode
2592
2596
: normalizeChildren ( res ) ;
2593
- return res && res . length === 0
2594
- ? undefined
2597
+ return res && (
2598
+ res . length === 0 ||
2599
+ ( res . length === 1 && res [ 0 ] . isComment ) // #9658
2600
+ ) ? undefined
2595
2601
: res
2596
2602
} ;
2597
2603
// this is a slot using the new v-slot syntax without scope. although it is
@@ -2771,12 +2777,13 @@ function bindObjectProps (
2771
2777
: data . attrs || ( data . attrs = { } ) ;
2772
2778
}
2773
2779
var camelizedKey = camelize ( key ) ;
2774
- if ( ! ( key in hash ) && ! ( camelizedKey in hash ) ) {
2780
+ var hyphenatedKey = hyphenate ( key ) ;
2781
+ if ( ! ( camelizedKey in hash ) && ! ( hyphenatedKey in hash ) ) {
2775
2782
hash [ key ] = value [ key ] ;
2776
2783
2777
2784
if ( isSync ) {
2778
2785
var on = data . on || ( data . on = { } ) ;
2779
- on [ ( "update:" + camelizedKey ) ] = function ( $event ) {
2786
+ on [ ( "update:" + key ) ] = function ( $event ) {
2780
2787
value [ key ] = $event ;
2781
2788
} ;
2782
2789
}
@@ -3611,7 +3618,7 @@ function resolveAsyncComponent (
3611
3618
}
3612
3619
3613
3620
var owner = currentRenderingInstance ;
3614
- if ( isDef ( factory . owners ) && factory . owners . indexOf ( owner ) === - 1 ) {
3621
+ if ( owner && isDef ( factory . owners ) && factory . owners . indexOf ( owner ) === - 1 ) {
3615
3622
// already pending
3616
3623
factory . owners . push ( owner ) ;
3617
3624
}
@@ -3620,7 +3627,7 @@ function resolveAsyncComponent (
3620
3627
return factory . loadingComp
3621
3628
}
3622
3629
3623
- if ( ! isDef ( factory . owners ) ) {
3630
+ if ( owner && ! isDef ( factory . owners ) ) {
3624
3631
var owners = factory . owners = [ owner ] ;
3625
3632
var sync = true
3626
3633
@@ -4235,10 +4242,15 @@ var getNow = Date.now;
4235
4242
// timestamp can either be hi-res (relative to page load) or low-res
4236
4243
// (relative to UNIX epoch), so in order to compare time we have to use the
4237
4244
// same timestamp type when saving the flush timestamp.
4238
- if ( inBrowser && getNow ( ) > document . createEvent ( 'Event' ) . timeStamp ) {
4239
- // if the low-res timestamp which is bigger than the event timestamp
4240
- // (which is evaluated AFTER) it means the event is using a hi-res timestamp,
4241
- // and we need to use the hi-res version for event listeners as well.
4245
+ if (
4246
+ inBrowser &&
4247
+ window . performance &&
4248
+ typeof performance . now === 'function' &&
4249
+ document . createEvent ( 'Event' ) . timeStamp <= performance . now ( )
4250
+ ) {
4251
+ // if the event timestamp is bigger than the hi-res timestamp
4252
+ // (which is evaluated AFTER) it means the event is using a lo-res timestamp,
4253
+ // and we need to use the lo-res version for event listeners as well.
4242
4254
getNow = function ( ) { return performance . now ( ) ; } ;
4243
4255
}
4244
4256
@@ -5404,7 +5416,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
5404
5416
value : FunctionalRenderContext
5405
5417
} ) ;
5406
5418
5407
- Vue . version = '2.6.8 ' ;
5419
+ Vue . version = '2.6.9 ' ;
5408
5420
5409
5421
/* */
5410
5422
@@ -7496,8 +7508,10 @@ function add$1 (
7496
7508
e . target === e . currentTarget ||
7497
7509
// event is fired after handler attachment
7498
7510
e . timeStamp >= attachedTimestamp ||
7499
- // #9462 bail for iOS 9 bug: event.timeStamp is 0 after history.pushState
7500
- e . timeStamp === 0 ||
7511
+ // bail for environments that have buggy event.timeStamp implementations
7512
+ // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState
7513
+ // #9681 QtWebEngine event.timeStamp is negative value
7514
+ e . timeStamp <= 0 ||
7501
7515
// #9448 bail if event is fired in another document in a multi-page
7502
7516
// electron/nw.js app, since event.timeStamp will be using a different
7503
7517
// starting reference
@@ -8115,8 +8129,8 @@ function enter (vnode, toggleDisplay) {
8115
8129
var context = activeInstance ;
8116
8130
var transitionNode = activeInstance . $vnode ;
8117
8131
while ( transitionNode && transitionNode . parent ) {
8118
- transitionNode = transitionNode . parent ;
8119
8132
context = transitionNode . context ;
8133
+ transitionNode = transitionNode . parent ;
8120
8134
}
8121
8135
8122
8136
var isAppear = ! context . _isMounted || ! vnode . isRootInsert ;
@@ -9823,7 +9837,7 @@ function parse (
9823
9837
text = preserveWhitespace ? ' ' : '' ;
9824
9838
}
9825
9839
if ( text ) {
9826
- if ( whitespaceOption === 'condense' ) {
9840
+ if ( ! inPre && whitespaceOption === 'condense' ) {
9827
9841
// condense consecutive whitespaces into single space
9828
9842
text = text . replace ( whitespaceRE$1 , ' ' ) ;
9829
9843
}
0 commit comments