Skip to content

Commit b694e3a

Browse files
committed
[build] 2.1.2
1 parent e4591ce commit b694e3a

File tree

10 files changed

+88
-58
lines changed

10 files changed

+88
-58
lines changed

dist/vue.common.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,8 +1409,6 @@ var util = Object.freeze({
14091409

14101410
/* not type checking this file because flow doesn't play well with Proxy */
14111411

1412-
var hasProxy;
1413-
var proxyHandlers;
14141412
var initProxy;
14151413

14161414
if (process.env.NODE_ENV !== 'production') {
@@ -1430,20 +1428,22 @@ if (process.env.NODE_ENV !== 'production') {
14301428
);
14311429
};
14321430

1433-
hasProxy =
1431+
var hasProxy =
14341432
typeof Proxy !== 'undefined' &&
14351433
Proxy.toString().match(/native code/);
14361434

1437-
proxyHandlers = {
1435+
var hasHandler = {
14381436
has: function has (target, key) {
14391437
var has = key in target;
14401438
var isAllowed = allowedGlobals(key) || key.charAt(0) === '_';
14411439
if (!has && !isAllowed) {
14421440
warnNonPresent(target, key);
14431441
}
14441442
return has || !isAllowed
1445-
},
1443+
}
1444+
};
14461445

1446+
var getHandler = {
14471447
get: function get (target, key) {
14481448
if (typeof key === 'string' && !(key in target)) {
14491449
warnNonPresent(target, key);
@@ -1454,7 +1454,12 @@ if (process.env.NODE_ENV !== 'production') {
14541454

14551455
initProxy = function initProxy (vm) {
14561456
if (hasProxy) {
1457-
vm._renderProxy = new Proxy(vm, proxyHandlers);
1457+
// determine which proxy handler to use
1458+
var options = vm.$options;
1459+
var handlers = options.render && options.render._withStripped
1460+
? getHandler
1461+
: hasHandler;
1462+
vm._renderProxy = new Proxy(vm, handlers);
14581463
} else {
14591464
vm._renderProxy = vm;
14601465
}
@@ -2839,7 +2844,7 @@ function initRender (vm) {
28392844
vm._staticTrees = null;
28402845
vm._renderContext = vm.$options._parentVnode && vm.$options._parentVnode.context;
28412846
vm.$slots = resolveSlots(vm.$options._renderChildren, vm._renderContext);
2842-
vm.$scopedSlots = null;
2847+
vm.$scopedSlots = {};
28432848
// bind the public createElement fn to this instance
28442849
// so that we get proper render context inside it.
28452850
vm.$createElement = bind$1(createElement, vm);
@@ -2867,7 +2872,7 @@ function renderMixin (Vue) {
28672872
}
28682873
}
28692874

2870-
if (_parentVnode) {
2875+
if (_parentVnode && _parentVnode.data.scopedSlots) {
28712876
vm.$scopedSlots = _parentVnode.data.scopedSlots;
28722877
}
28732878

@@ -3013,7 +3018,7 @@ function renderMixin (Vue) {
30133018
fallback,
30143019
props
30153020
) {
3016-
var scopedSlotFn = this.$scopedSlots && this.$scopedSlots[name];
3021+
var scopedSlotFn = this.$scopedSlots[name];
30173022
if (scopedSlotFn) { // scoped slot
30183023
return scopedSlotFn(props || {}) || fallback
30193024
} else {

dist/vue.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,8 +1413,6 @@ var util = Object.freeze({
14131413

14141414
/* not type checking this file because flow doesn't play well with Proxy */
14151415

1416-
var hasProxy;
1417-
var proxyHandlers;
14181416
var initProxy;
14191417

14201418
{
@@ -1434,20 +1432,22 @@ var initProxy;
14341432
);
14351433
};
14361434

1437-
hasProxy =
1435+
var hasProxy =
14381436
typeof Proxy !== 'undefined' &&
14391437
Proxy.toString().match(/native code/);
14401438

1441-
proxyHandlers = {
1439+
var hasHandler = {
14421440
has: function has (target, key) {
14431441
var has = key in target;
14441442
var isAllowed = allowedGlobals(key) || key.charAt(0) === '_';
14451443
if (!has && !isAllowed) {
14461444
warnNonPresent(target, key);
14471445
}
14481446
return has || !isAllowed
1449-
},
1447+
}
1448+
};
14501449

1450+
var getHandler = {
14511451
get: function get (target, key) {
14521452
if (typeof key === 'string' && !(key in target)) {
14531453
warnNonPresent(target, key);
@@ -1458,7 +1458,12 @@ var initProxy;
14581458

14591459
initProxy = function initProxy (vm) {
14601460
if (hasProxy) {
1461-
vm._renderProxy = new Proxy(vm, proxyHandlers);
1461+
// determine which proxy handler to use
1462+
var options = vm.$options;
1463+
var handlers = options.render && options.render._withStripped
1464+
? getHandler
1465+
: hasHandler;
1466+
vm._renderProxy = new Proxy(vm, handlers);
14621467
} else {
14631468
vm._renderProxy = vm;
14641469
}
@@ -2841,7 +2846,7 @@ function initRender (vm) {
28412846
vm._staticTrees = null;
28422847
vm._renderContext = vm.$options._parentVnode && vm.$options._parentVnode.context;
28432848
vm.$slots = resolveSlots(vm.$options._renderChildren, vm._renderContext);
2844-
vm.$scopedSlots = null;
2849+
vm.$scopedSlots = {};
28452850
// bind the public createElement fn to this instance
28462851
// so that we get proper render context inside it.
28472852
vm.$createElement = bind$1(createElement, vm);
@@ -2869,7 +2874,7 @@ function renderMixin (Vue) {
28692874
}
28702875
}
28712876

2872-
if (_parentVnode) {
2877+
if (_parentVnode && _parentVnode.data.scopedSlots) {
28732878
vm.$scopedSlots = _parentVnode.data.scopedSlots;
28742879
}
28752880

@@ -3015,7 +3020,7 @@ function renderMixin (Vue) {
30153020
fallback,
30163021
props
30173022
) {
3018-
var scopedSlotFn = this.$scopedSlots && this.$scopedSlots[name];
3023+
var scopedSlotFn = this.$scopedSlots[name];
30193024
if (scopedSlotFn) { // scoped slot
30203025
return scopedSlotFn(props || {}) || fallback
30213026
} else {

dist/vue.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue.runtime.common.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,8 +1409,6 @@ var util = Object.freeze({
14091409

14101410
/* not type checking this file because flow doesn't play well with Proxy */
14111411

1412-
var hasProxy;
1413-
var proxyHandlers;
14141412
var initProxy;
14151413

14161414
if (process.env.NODE_ENV !== 'production') {
@@ -1430,20 +1428,22 @@ if (process.env.NODE_ENV !== 'production') {
14301428
);
14311429
};
14321430

1433-
hasProxy =
1431+
var hasProxy =
14341432
typeof Proxy !== 'undefined' &&
14351433
Proxy.toString().match(/native code/);
14361434

1437-
proxyHandlers = {
1435+
var hasHandler = {
14381436
has: function has (target, key) {
14391437
var has = key in target;
14401438
var isAllowed = allowedGlobals(key) || key.charAt(0) === '_';
14411439
if (!has && !isAllowed) {
14421440
warnNonPresent(target, key);
14431441
}
14441442
return has || !isAllowed
1445-
},
1443+
}
1444+
};
14461445

1446+
var getHandler = {
14471447
get: function get (target, key) {
14481448
if (typeof key === 'string' && !(key in target)) {
14491449
warnNonPresent(target, key);
@@ -1454,7 +1454,12 @@ if (process.env.NODE_ENV !== 'production') {
14541454

14551455
initProxy = function initProxy (vm) {
14561456
if (hasProxy) {
1457-
vm._renderProxy = new Proxy(vm, proxyHandlers);
1457+
// determine which proxy handler to use
1458+
var options = vm.$options;
1459+
var handlers = options.render && options.render._withStripped
1460+
? getHandler
1461+
: hasHandler;
1462+
vm._renderProxy = new Proxy(vm, handlers);
14581463
} else {
14591464
vm._renderProxy = vm;
14601465
}
@@ -2839,7 +2844,7 @@ function initRender (vm) {
28392844
vm._staticTrees = null;
28402845
vm._renderContext = vm.$options._parentVnode && vm.$options._parentVnode.context;
28412846
vm.$slots = resolveSlots(vm.$options._renderChildren, vm._renderContext);
2842-
vm.$scopedSlots = null;
2847+
vm.$scopedSlots = {};
28432848
// bind the public createElement fn to this instance
28442849
// so that we get proper render context inside it.
28452850
vm.$createElement = bind$1(createElement, vm);
@@ -2867,7 +2872,7 @@ function renderMixin (Vue) {
28672872
}
28682873
}
28692874

2870-
if (_parentVnode) {
2875+
if (_parentVnode && _parentVnode.data.scopedSlots) {
28712876
vm.$scopedSlots = _parentVnode.data.scopedSlots;
28722877
}
28732878

@@ -3013,7 +3018,7 @@ function renderMixin (Vue) {
30133018
fallback,
30143019
props
30153020
) {
3016-
var scopedSlotFn = this.$scopedSlots && this.$scopedSlots[name];
3021+
var scopedSlotFn = this.$scopedSlots[name];
30173022
if (scopedSlotFn) { // scoped slot
30183023
return scopedSlotFn(props || {}) || fallback
30193024
} else {

dist/vue.runtime.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,8 +1413,6 @@ var util = Object.freeze({
14131413

14141414
/* not type checking this file because flow doesn't play well with Proxy */
14151415

1416-
var hasProxy;
1417-
var proxyHandlers;
14181416
var initProxy;
14191417

14201418
{
@@ -1434,20 +1432,22 @@ var initProxy;
14341432
);
14351433
};
14361434

1437-
hasProxy =
1435+
var hasProxy =
14381436
typeof Proxy !== 'undefined' &&
14391437
Proxy.toString().match(/native code/);
14401438

1441-
proxyHandlers = {
1439+
var hasHandler = {
14421440
has: function has (target, key) {
14431441
var has = key in target;
14441442
var isAllowed = allowedGlobals(key) || key.charAt(0) === '_';
14451443
if (!has && !isAllowed) {
14461444
warnNonPresent(target, key);
14471445
}
14481446
return has || !isAllowed
1449-
},
1447+
}
1448+
};
14501449

1450+
var getHandler = {
14511451
get: function get (target, key) {
14521452
if (typeof key === 'string' && !(key in target)) {
14531453
warnNonPresent(target, key);
@@ -1458,7 +1458,12 @@ var initProxy;
14581458

14591459
initProxy = function initProxy (vm) {
14601460
if (hasProxy) {
1461-
vm._renderProxy = new Proxy(vm, proxyHandlers);
1461+
// determine which proxy handler to use
1462+
var options = vm.$options;
1463+
var handlers = options.render && options.render._withStripped
1464+
? getHandler
1465+
: hasHandler;
1466+
vm._renderProxy = new Proxy(vm, handlers);
14621467
} else {
14631468
vm._renderProxy = vm;
14641469
}
@@ -2841,7 +2846,7 @@ function initRender (vm) {
28412846
vm._staticTrees = null;
28422847
vm._renderContext = vm.$options._parentVnode && vm.$options._parentVnode.context;
28432848
vm.$slots = resolveSlots(vm.$options._renderChildren, vm._renderContext);
2844-
vm.$scopedSlots = null;
2849+
vm.$scopedSlots = {};
28452850
// bind the public createElement fn to this instance
28462851
// so that we get proper render context inside it.
28472852
vm.$createElement = bind$1(createElement, vm);
@@ -2869,7 +2874,7 @@ function renderMixin (Vue) {
28692874
}
28702875
}
28712876

2872-
if (_parentVnode) {
2877+
if (_parentVnode && _parentVnode.data.scopedSlots) {
28732878
vm.$scopedSlots = _parentVnode.data.scopedSlots;
28742879
}
28752880

@@ -3015,7 +3020,7 @@ function renderMixin (Vue) {
30153020
fallback,
30163021
props
30173022
) {
3018-
var scopedSlotFn = this.$scopedSlots && this.$scopedSlots[name];
3023+
var scopedSlotFn = this.$scopedSlots[name];
30193024
if (scopedSlotFn) { // scoped slot
30203025
return scopedSlotFn(props || {}) || fallback
30213026
} else {

dist/vue.runtime.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/vue-server-renderer/build.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -664,8 +664,6 @@ if (typeof Set !== 'undefined' && isNative(Set)) {
664664

665665
/* not type checking this file because flow doesn't play well with Proxy */
666666

667-
var hasProxy;
668-
var proxyHandlers;
669667
var initProxy;
670668

671669
if (process.env.NODE_ENV !== 'production') {
@@ -685,20 +683,22 @@ if (process.env.NODE_ENV !== 'production') {
685683
);
686684
};
687685

688-
hasProxy =
686+
var hasProxy =
689687
typeof Proxy !== 'undefined' &&
690688
Proxy.toString().match(/native code/);
691689

692-
proxyHandlers = {
690+
var hasHandler = {
693691
has: function has (target, key) {
694692
var has = key in target;
695693
var isAllowed = allowedGlobals(key) || key.charAt(0) === '_';
696694
if (!has && !isAllowed) {
697695
warnNonPresent(target, key);
698696
}
699697
return has || !isAllowed
700-
},
698+
}
699+
};
701700

701+
var getHandler = {
702702
get: function get (target, key) {
703703
if (typeof key === 'string' && !(key in target)) {
704704
warnNonPresent(target, key);
@@ -709,7 +709,12 @@ if (process.env.NODE_ENV !== 'production') {
709709

710710
initProxy = function initProxy (vm$$1) {
711711
if (hasProxy) {
712-
vm$$1._renderProxy = new Proxy(vm$$1, proxyHandlers);
712+
// determine which proxy handler to use
713+
var options = vm$$1.$options;
714+
var handlers = options.render && options.render._withStripped
715+
? getHandler
716+
: hasHandler;
717+
vm$$1._renderProxy = new Proxy(vm$$1, handlers);
713718
} else {
714719
vm$$1._renderProxy = vm$$1;
715720
}
@@ -2406,7 +2411,7 @@ function initRender (vm$$1) {
24062411
vm$$1._staticTrees = null;
24072412
vm$$1._renderContext = vm$$1.$options._parentVnode && vm$$1.$options._parentVnode.context;
24082413
vm$$1.$slots = resolveSlots(vm$$1.$options._renderChildren, vm$$1._renderContext);
2409-
vm$$1.$scopedSlots = null;
2414+
vm$$1.$scopedSlots = {};
24102415
// bind the public createElement fn to this instance
24112416
// so that we get proper render context inside it.
24122417
vm$$1.$createElement = bind(createElement, vm$$1);
@@ -2434,7 +2439,7 @@ function renderMixin (Vue) {
24342439
}
24352440
}
24362441

2437-
if (_parentVnode) {
2442+
if (_parentVnode && _parentVnode.data.scopedSlots) {
24382443
vm$$1.$scopedSlots = _parentVnode.data.scopedSlots;
24392444
}
24402445

@@ -2580,7 +2585,7 @@ function renderMixin (Vue) {
25802585
fallback,
25812586
props
25822587
) {
2583-
var scopedSlotFn = this.$scopedSlots && this.$scopedSlots[name];
2588+
var scopedSlotFn = this.$scopedSlots[name];
25842589
if (scopedSlotFn) { // scoped slot
25852590
return scopedSlotFn(props || {}) || fallback
25862591
} else {

packages/vue-server-renderer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-server-renderer",
3-
"version": "2.1.1",
3+
"version": "2.1.2",
44
"description": "server renderer for Vue 2.0",
55
"main": "index.js",
66
"repository": {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy