File tree Expand file tree Collapse file tree 4 files changed +21
-23
lines changed
test/unit/specs/directives/public/for Expand file tree Collapse file tree 4 files changed +21
-23
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,7 @@ import {
1616 def ,
1717 cancellable ,
1818 isArray ,
19- isPlainObject ,
20- findVmFromFrag
19+ isPlainObject
2120} from '../../util/index'
2221
2322let uid = 0
@@ -658,4 +657,22 @@ if (process.env.NODE_ENV !== 'production') {
658657 }
659658}
660659
660+ /**
661+ * Find a vm from a fragment.
662+ *
663+ * @param {Fragment } frag
664+ * @return {Vue|undefined }
665+ */
666+
667+ function findVmFromFrag ( frag ) {
668+ let node = frag . node
669+ // handle multi-node frag
670+ if ( frag . end ) {
671+ while ( ! node . __vue__ && node !== frag . end && node . nextSibling ) {
672+ node = node . nextSibling
673+ }
674+ }
675+ return node . __vue__
676+ }
677+
661678export default vFor
Original file line number Diff line number Diff line change 55 remove ,
66 replace ,
77 createAnchor ,
8- warn ,
9- findVmFromFrag
8+ warn
109} from '../../util/index'
1110
1211export default {
Original file line number Diff line number Diff line change @@ -449,21 +449,3 @@ export function getOuterHTML (el) {
449449 return container . innerHTML
450450 }
451451}
452-
453- /**
454- * Find a vm from a fragment.
455- *
456- * @param {Fragment } frag
457- * @return {Vue|undefined }
458- */
459-
460- export function findVmFromFrag ( frag ) {
461- let node = frag . node
462- // handle multi-node frag
463- if ( frag . end ) {
464- while ( ! node . __vue__ && node !== frag . end && node . nextSibling ) {
465- node = node . nextSibling
466- }
467- }
468- return node . __vue__
469- }
Original file line number Diff line number Diff line change @@ -1002,7 +1002,7 @@ describe('v-for', function () {
10021002 expect ( 'Frozen v-for objects cannot be automatically tracked' ) . toHaveBeenWarned ( )
10031003 } )
10041004
1005- it ( 'warn v-if and v-for mixed usage' , ( ) => {
1005+ it ( 'warn v-if and v-for mixed usage' , function ( ) {
10061006 new Vue ( {
10071007 el : document . createElement ( 'div' ) ,
10081008 template : '<div v-for="item in items" v-if="ok"></div>' ,
You can’t perform that action at this time.
0 commit comments