vue 2.6.9 → 2.6.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vue.js v2.6.9
2
+ * Vue.js v2.6.10
3
3
  * (c) 2014-2019 Evan You
4
4
  * Released under the MIT License.
5
5
  */
@@ -2544,8 +2544,8 @@ function normalizeScopedSlots (
2544
2544
  prevSlots
2545
2545
  ) {
2546
2546
  var res;
2547
- var isStable = slots ? !!slots.$stable : true;
2548
2547
  var hasNormalSlots = Object.keys(normalSlots).length > 0;
2548
+ var isStable = slots ? !!slots.$stable : !hasNormalSlots;
2549
2549
  var key = slots && slots.$key;
2550
2550
  if (!slots) {
2551
2551
  res = {};
@@ -3629,7 +3629,9 @@ function resolveAsyncComponent (
3629
3629
 
3630
3630
  if (owner && !isDef(factory.owners)) {
3631
3631
  var owners = factory.owners = [owner];
3632
- var sync = true
3632
+ var sync = true;
3633
+ var timerLoading = null;
3634
+ var timerTimeout = null
3633
3635
 
3634
3636
  ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
3635
3637
 
@@ -3640,6 +3642,14 @@ function resolveAsyncComponent (
3640
3642
 
3641
3643
  if (renderCompleted) {
3642
3644
  owners.length = 0;
3645
+ if (timerLoading !== null) {
3646
+ clearTimeout(timerLoading);
3647
+ timerLoading = null;
3648
+ }
3649
+ if (timerTimeout !== null) {
3650
+ clearTimeout(timerTimeout);
3651
+ timerTimeout = null;
3652
+ }
3643
3653
  }
3644
3654
  };
3645
3655
 
@@ -3686,7 +3696,8 @@ function resolveAsyncComponent (
3686
3696
  if (res.delay === 0) {
3687
3697
  factory.loading = true;
3688
3698
  } else {
3689
- setTimeout(function () {
3699
+ timerLoading = setTimeout(function () {
3700
+ timerLoading = null;
3690
3701
  if (isUndef(factory.resolved) && isUndef(factory.error)) {
3691
3702
  factory.loading = true;
3692
3703
  forceRender(false);
@@ -3696,7 +3707,8 @@ function resolveAsyncComponent (
3696
3707
  }
3697
3708
 
3698
3709
  if (isDef(res.timeout)) {
3699
- setTimeout(function () {
3710
+ timerTimeout = setTimeout(function () {
3711
+ timerTimeout = null;
3700
3712
  if (isUndef(factory.resolved)) {
3701
3713
  reject(
3702
3714
  "timeout (" + (res.timeout) + "ms)"
@@ -4242,16 +4254,21 @@ var getNow = Date.now;
4242
4254
  // timestamp can either be hi-res (relative to page load) or low-res
4243
4255
  // (relative to UNIX epoch), so in order to compare time we have to use the
4244
4256
  // same timestamp type when saving the flush timestamp.
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.
4254
- getNow = function () { return performance.now(); };
4257
+ // All IE versions use low-res event timestamps, and have problematic clock
4258
+ // implementations (#9632)
4259
+ if (inBrowser && !isIE) {
4260
+ var performance = window.performance;
4261
+ if (
4262
+ performance &&
4263
+ typeof performance.now === 'function' &&
4264
+ getNow() > document.createEvent('Event').timeStamp
4265
+ ) {
4266
+ // if the event timestamp, although evaluated AFTER the Date.now(), is
4267
+ // smaller than it, it means the event is using a hi-res timestamp,
4268
+ // and we need to use the hi-res version for event listener timestamps as
4269
+ // well.
4270
+ getNow = function () { return performance.now(); };
4271
+ }
4255
4272
  }
4256
4273
 
4257
4274
  /**
@@ -5416,7 +5433,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
5416
5433
  value: FunctionalRenderContext
5417
5434
  });
5418
5435
 
5419
- Vue.version = '2.6.9';
5436
+ Vue.version = '2.6.10';
5420
5437
 
5421
5438
  /* */
5422
5439
 
@@ -7578,10 +7595,11 @@ function updateDOMProps (oldVnode, vnode) {
7578
7595
  }
7579
7596
 
7580
7597
  for (key in oldProps) {
7581
- if (isUndef(props[key])) {
7598
+ if (!(key in props)) {
7582
7599
  elm[key] = '';
7583
7600
  }
7584
7601
  }
7602
+
7585
7603
  for (key in props) {
7586
7604
  cur = props[key];
7587
7605
  // ignore children if the node has textContent or innerHTML,
@@ -10698,7 +10716,7 @@ function isDirectChildOfTemplateFor (node) {
10698
10716
 
10699
10717
  /* */
10700
10718
 
10701
- var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/;
10719
+ var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*(?:[\w$]+)?\s*\(/;
10702
10720
  var fnInvokeRE = /\([^)]*?\);*$/;
10703
10721
  var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/;
10704
10722