You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dist/vue.common.js
+71-35Lines changed: 71 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -428,7 +428,7 @@ if (process.env.NODE_ENV !== 'production') {
428
428
varhas=keyintarget;
429
429
varisAllowedGlobal=allowedGlobals(key);
430
430
if(!has&&!isAllowedGlobal){
431
-
warn('Trying to access non-existent property "'+key+'" while rendering. '+'Make sure to declare reactive data properties in the data option.',target);
431
+
warn('Property or method "'+key+'" is not defined on the instance but '+'referenced during render. Make sure to declare reactive data '+'properties in the data option.',target);
432
432
}
433
433
return!isAllowedGlobal;
434
434
}
@@ -1362,7 +1362,9 @@ function updateListeners(on, oldOn, add, remove) {
1362
1362
for(nameinon){
1363
1363
cur=on[name];
1364
1364
old=oldOn[name];
1365
-
if(!old){
1365
+
if(!cur){
1366
+
process.env.NODE_ENV!=='production'&&warn('Handler for event "'+name+'" is undefined.');
1367
+
}elseif(!old){
1366
1368
capture=name.charAt(0)==='!';
1367
1369
event=capture ? name.slice(1) : name;
1368
1370
if(Array.isArray(cur)){
@@ -1471,15 +1473,16 @@ function lifecycleMixin(Vue) {
1471
1473
varprevEl=vm.$el;
1472
1474
varprevActiveInstance=activeInstance;
1473
1475
activeInstance=vm;
1474
-
if(!vm._vnode){
1476
+
varprevVnode=vm._vnode;
1477
+
vm._vnode=vnode;
1478
+
if(!prevVnode){
1475
1479
// Vue.prototype.__patch__ is injected in entry points
1476
1480
// based on the rendering backend used.
1477
1481
vm.$el=vm.__patch__(vm.$el,vnode,hydrating);
1478
1482
}else{
1479
-
vm.$el=vm.__patch__(vm._vnode,vnode);
1483
+
vm.$el=vm.__patch__(prevVnode,vnode);
1480
1484
}
1481
1485
activeInstance=prevActiveInstance;
1482
-
vm._vnode=vnode;
1483
1486
// update __vue__ reference
1484
1487
if(prevEl){
1485
1488
prevEl.__vue__=null;
@@ -1535,11 +1538,6 @@ function lifecycleMixin(Vue) {
1535
1538
if(vm._watcher){
1536
1539
vm._watcher.update();
1537
1540
}
1538
-
if(vm._watchers.length){
1539
-
for(vari=0;i<vm._watchers.length;i++){
1540
-
vm._watchers[i].update(true/* shallow */);
1541
-
}
1542
-
}
1543
1541
};
1544
1542
1545
1543
Vue.prototype.$destroy=function(){
@@ -1701,7 +1699,7 @@ parent // activeInstance in lifecycle state
0 commit comments