Skip to content

Commit 06dbb2a

Browse files
committed
build: build 2.5.22
1 parent 7ac8f63 commit 06dbb2a

File tree

14 files changed

+329
-339
lines changed

14 files changed

+329
-339
lines changed

dist/vue.common.js

Lines changed: 36 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
2-
* Vue.js v2.5.21
3-
* (c) 2014-2018 Evan You
2+
* Vue.js v2.5.22
3+
* (c) 2014-2019 Evan You
44
* Released under the MIT License.
55
*/
66
'use strict';
@@ -629,7 +629,7 @@ if (process.env.NODE_ENV !== 'production') {
629629
? vm.options
630630
: vm._isVue
631631
? vm.$options || vm.constructor.options
632-
: vm || {};
632+
: vm;
633633
var name = options.name || options._componentTag;
634634
var file = options.__file;
635635
if (!name && file) {
@@ -724,9 +724,9 @@ Dep.prototype.notify = function notify () {
724724
}
725725
};
726726

727-
// the current target watcher being evaluated.
728-
// this is globally unique because there could be only one
729-
// watcher being evaluated at any time.
727+
// The current target watcher being evaluated.
728+
// This is globally unique because only one watcher
729+
// can be evaluated at a time.
730730
Dep.target = null;
731731
var targetStack = [];
732732

@@ -1254,13 +1254,26 @@ function mergeHook (
12541254
parentVal,
12551255
childVal
12561256
) {
1257-
return childVal
1257+
var res = childVal
12581258
? parentVal
12591259
? parentVal.concat(childVal)
12601260
: Array.isArray(childVal)
12611261
? childVal
12621262
: [childVal]
1263-
: parentVal
1263+
: parentVal;
1264+
return res
1265+
? dedupeHooks(res)
1266+
: res
1267+
}
1268+
1269+
function dedupeHooks (hooks) {
1270+
var res = [];
1271+
for (var i = 0; i < hooks.length; i++) {
1272+
if (res.indexOf(hooks[i]) === -1) {
1273+
res.push(hooks[i]);
1274+
}
1275+
}
1276+
return res
12641277
}
12651278

12661279
LIFECYCLE_HOOKS.forEach(function (hook) {
@@ -1496,7 +1509,7 @@ function mergeOptions (
14961509
normalizeProps(child, vm);
14971510
normalizeInject(child, vm);
14981511
normalizeDirectives(child);
1499-
1512+
15001513
// Apply extends and mixins on the child options,
15011514
// but only if it is a raw options object that isn't
15021515
// the result of another mergeOptions call.
@@ -2431,6 +2444,8 @@ function resolveAsyncComponent (
24312444
// (async resolves are shimmed as synchronous during SSR)
24322445
if (!sync) {
24332446
forceRender(true);
2447+
} else {
2448+
contexts.length = 0;
24342449
}
24352450
});
24362451

@@ -2598,8 +2613,8 @@ function eventsMixin (Vue) {
25982613
}
25992614
// array of events
26002615
if (Array.isArray(event)) {
2601-
for (var i = 0, l = event.length; i < l; i++) {
2602-
vm.$off(event[i], fn);
2616+
for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
2617+
vm.$off(event[i$1], fn);
26032618
}
26042619
return vm
26052620
}
@@ -2612,16 +2627,14 @@ function eventsMixin (Vue) {
26122627
vm._events[event] = null;
26132628
return vm
26142629
}
2615-
if (fn) {
2616-
// specific handler
2617-
var cb;
2618-
var i$1 = cbs.length;
2619-
while (i$1--) {
2620-
cb = cbs[i$1];
2621-
if (cb === fn || cb.fn === fn) {
2622-
cbs.splice(i$1, 1);
2623-
break
2624-
}
2630+
// specific handler
2631+
var cb;
2632+
var i = cbs.length;
2633+
while (i--) {
2634+
cb = cbs[i];
2635+
if (cb === fn || cb.fn === fn) {
2636+
cbs.splice(i, 1);
2637+
break
26252638
}
26262639
}
26272640
return vm
@@ -4791,36 +4804,16 @@ function resolveConstructorOptions (Ctor) {
47914804
function resolveModifiedOptions (Ctor) {
47924805
var modified;
47934806
var latest = Ctor.options;
4794-
var extended = Ctor.extendOptions;
47954807
var sealed = Ctor.sealedOptions;
47964808
for (var key in latest) {
47974809
if (latest[key] !== sealed[key]) {
47984810
if (!modified) { modified = {}; }
4799-
modified[key] = dedupe(latest[key], extended[key], sealed[key]);
4811+
modified[key] = latest[key];
48004812
}
48014813
}
48024814
return modified
48034815
}
48044816

4805-
function dedupe (latest, extended, sealed) {
4806-
// compare latest and sealed to ensure lifecycle hooks won't be duplicated
4807-
// between merges
4808-
if (Array.isArray(latest)) {
4809-
var res = [];
4810-
sealed = Array.isArray(sealed) ? sealed : [sealed];
4811-
extended = Array.isArray(extended) ? extended : [extended];
4812-
for (var i = 0; i < latest.length; i++) {
4813-
// push original options and not sealed options to exclude duplicated options
4814-
if (extended.indexOf(latest[i]) >= 0 || sealed.indexOf(latest[i]) < 0) {
4815-
res.push(latest[i]);
4816-
}
4817-
}
4818-
return res
4819-
} else {
4820-
return latest
4821-
}
4822-
}
4823-
48244817
function Vue (options) {
48254818
if (process.env.NODE_ENV !== 'production' &&
48264819
!(this instanceof Vue)
@@ -5189,7 +5182,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
51895182
value: FunctionalRenderContext
51905183
});
51915184

5192-
Vue.version = '2.5.21';
5185+
Vue.version = '2.5.22';
51935186

51945187
/* */
51955188

dist/vue.esm.js

Lines changed: 36 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
2-
* Vue.js v2.5.21
3-
* (c) 2014-2018 Evan You
2+
* Vue.js v2.5.22
3+
* (c) 2014-2019 Evan You
44
* Released under the MIT License.
55
*/
66
/* */
@@ -627,7 +627,7 @@ if (process.env.NODE_ENV !== 'production') {
627627
? vm.options
628628
: vm._isVue
629629
? vm.$options || vm.constructor.options
630-
: vm || {};
630+
: vm;
631631
var name = options.name || options._componentTag;
632632
var file = options.__file;
633633
if (!name && file) {
@@ -722,9 +722,9 @@ Dep.prototype.notify = function notify () {
722722
}
723723
};
724724

725-
// the current target watcher being evaluated.
726-
// this is globally unique because there could be only one
727-
// watcher being evaluated at any time.
725+
// The current target watcher being evaluated.
726+
// This is globally unique because only one watcher
727+
// can be evaluated at a time.
728728
Dep.target = null;
729729
var targetStack = [];
730730

@@ -1252,13 +1252,26 @@ function mergeHook (
12521252
parentVal,
12531253
childVal
12541254
) {
1255-
return childVal
1255+
var res = childVal
12561256
? parentVal
12571257
? parentVal.concat(childVal)
12581258
: Array.isArray(childVal)
12591259
? childVal
12601260
: [childVal]
1261-
: parentVal
1261+
: parentVal;
1262+
return res
1263+
? dedupeHooks(res)
1264+
: res
1265+
}
1266+
1267+
function dedupeHooks (hooks) {
1268+
var res = [];
1269+
for (var i = 0; i < hooks.length; i++) {
1270+
if (res.indexOf(hooks[i]) === -1) {
1271+
res.push(hooks[i]);
1272+
}
1273+
}
1274+
return res
12621275
}
12631276

12641277
LIFECYCLE_HOOKS.forEach(function (hook) {
@@ -1494,7 +1507,7 @@ function mergeOptions (
14941507
normalizeProps(child, vm);
14951508
normalizeInject(child, vm);
14961509
normalizeDirectives(child);
1497-
1510+
14981511
// Apply extends and mixins on the child options,
14991512
// but only if it is a raw options object that isn't
15001513
// the result of another mergeOptions call.
@@ -2429,6 +2442,8 @@ function resolveAsyncComponent (
24292442
// (async resolves are shimmed as synchronous during SSR)
24302443
if (!sync) {
24312444
forceRender(true);
2445+
} else {
2446+
contexts.length = 0;
24322447
}
24332448
});
24342449

@@ -2596,8 +2611,8 @@ function eventsMixin (Vue) {
25962611
}
25972612
// array of events
25982613
if (Array.isArray(event)) {
2599-
for (var i = 0, l = event.length; i < l; i++) {
2600-
vm.$off(event[i], fn);
2614+
for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
2615+
vm.$off(event[i$1], fn);
26012616
}
26022617
return vm
26032618
}
@@ -2610,16 +2625,14 @@ function eventsMixin (Vue) {
26102625
vm._events[event] = null;
26112626
return vm
26122627
}
2613-
if (fn) {
2614-
// specific handler
2615-
var cb;
2616-
var i$1 = cbs.length;
2617-
while (i$1--) {
2618-
cb = cbs[i$1];
2619-
if (cb === fn || cb.fn === fn) {
2620-
cbs.splice(i$1, 1);
2621-
break
2622-
}
2628+
// specific handler
2629+
var cb;
2630+
var i = cbs.length;
2631+
while (i--) {
2632+
cb = cbs[i];
2633+
if (cb === fn || cb.fn === fn) {
2634+
cbs.splice(i, 1);
2635+
break
26232636
}
26242637
}
26252638
return vm
@@ -4789,36 +4802,16 @@ function resolveConstructorOptions (Ctor) {
47894802
function resolveModifiedOptions (Ctor) {
47904803
var modified;
47914804
var latest = Ctor.options;
4792-
var extended = Ctor.extendOptions;
47934805
var sealed = Ctor.sealedOptions;
47944806
for (var key in latest) {
47954807
if (latest[key] !== sealed[key]) {
47964808
if (!modified) { modified = {}; }
4797-
modified[key] = dedupe(latest[key], extended[key], sealed[key]);
4809+
modified[key] = latest[key];
47984810
}
47994811
}
48004812
return modified
48014813
}
48024814

4803-
function dedupe (latest, extended, sealed) {
4804-
// compare latest and sealed to ensure lifecycle hooks won't be duplicated
4805-
// between merges
4806-
if (Array.isArray(latest)) {
4807-
var res = [];
4808-
sealed = Array.isArray(sealed) ? sealed : [sealed];
4809-
extended = Array.isArray(extended) ? extended : [extended];
4810-
for (var i = 0; i < latest.length; i++) {
4811-
// push original options and not sealed options to exclude duplicated options
4812-
if (extended.indexOf(latest[i]) >= 0 || sealed.indexOf(latest[i]) < 0) {
4813-
res.push(latest[i]);
4814-
}
4815-
}
4816-
return res
4817-
} else {
4818-
return latest
4819-
}
4820-
}
4821-
48224815
function Vue (options) {
48234816
if (process.env.NODE_ENV !== 'production' &&
48244817
!(this instanceof Vue)
@@ -5187,7 +5180,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
51875180
value: FunctionalRenderContext
51885181
});
51895182

5190-
Vue.version = '2.5.21';
5183+
Vue.version = '2.5.22';
51915184

51925185
/* */
51935186

0 commit comments

Comments
 (0)