Browse Source

fix duplicate slot warning spelling

dev
Evan You 8 years ago
parent
commit
673dec6040
  1. 2
      src/core/instance/render.js
  2. 6
      test/unit/features/component/component-slot.spec.js

2
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
)

6
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

Loading…
Cancel
Save