Evan You 10 лет назад
Родитель
Сommit
e6291c22ed
2 измененных файлов с 3 добавлено и 3 удалено
  1. 2 2
      src/parsers/template.js
  2. 1 1
      test/unit/specs/directives/public/for/for_spec.js

+ 2 - 2
src/parsers/template.js

@@ -144,8 +144,8 @@ function nodeToFragment (node) {
   // if its a template tag and the browser supports it,
   // its content is already a document fragment. However, iOS Safari has
   // bug when using directly cloned template content with touch
-  // events and can cause crashes the nodes are removed from DOM, so we have
-  // to treat template elements as string templates. (#2805)
+  // events and can cause crashes when the nodes are removed from DOM, so we
+  // have to treat template elements as string templates. (#2805)
   if (isRealTemplate(node)) {
     return stringToFragment(node.innerHTML)
   }

+ 1 - 1
test/unit/specs/directives/public/for/for_spec.js

@@ -996,7 +996,7 @@ describe('v-for', function () {
       el: document.createElement('div'),
       template: '<div v-for="item in items">{{item.name}}</div>',
       data: {
-        items: [Object.freeze({name:'hi'})]
+        items: [Object.freeze({ name:'hi' })]
       }
     })
     expect('Frozen v-for objects cannot be automatically tracked').toHaveBeenWarned()