Explorar el Código

fix duplicate slot warning spelling

Evan You hace 9 años
padre
commit
673dec6040

+ 1 - 1
src/core/instance/render.js

@@ -164,7 +164,7 @@ export function renderMixin (Vue: Class<Component>) {
     // warn duplicate slot usage
     if (slotNodes && process.env.NODE_ENV !== 'production') {
       slotNodes._rendered && warn(
-        `Duplicate presense of slot "${name}" found in the same render tree ` +
+        `Duplicate presence of slot "${name}" found in the same render tree ` +
         `- this will likely cause render errors.`,
         this
       )

+ 3 - 3
test/unit/features/component/component-slot.spec.js

@@ -472,8 +472,8 @@ describe('Component slot', () => {
         }
       }
     }).$mount()
-    expect('Duplicate presense of slot "default"').toHaveBeenWarned()
-    expect('Duplicate presense of slot "a"').toHaveBeenWarned()
+    expect('Duplicate presence of slot "default"').toHaveBeenWarned()
+    expect('Duplicate presence of slot "a"').toHaveBeenWarned()
   })
 
   it('should not warn valid conditional slots', () => {
@@ -492,7 +492,7 @@ describe('Component slot', () => {
         }
       }
     }).$mount()
-    expect('Duplicate presense of slot "default"').not.toHaveBeenWarned()
+    expect('Duplicate presence of slot "default"').not.toHaveBeenWarned()
   })
 
   // #3518