File tree Expand file tree Collapse file tree 2 files changed +1
-10
lines changed
test/unit/features/options Expand file tree Collapse file tree 2 files changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -22,14 +22,13 @@ export function initExtend (Vue: GlobalAPI) {
22
22
if ( isFirstExtend && extendOptions . _Ctor ) {
23
23
return extendOptions . _Ctor
24
24
}
25
- let name = extendOptions . name || Super . options . name
25
+ const name = extendOptions . name || Super . options . name
26
26
if ( process . env . NODE_ENV !== 'production' ) {
27
27
if ( ! / ^ [ a - z A - Z ] [ \w - ] * $ / . test ( name ) ) {
28
28
warn (
29
29
'Invalid component name: "' + name + '". Component names ' +
30
30
'can only contain alphanumeric characaters and the hyphen.'
31
31
)
32
- name = null
33
32
}
34
33
}
35
34
const Sub = function VueComponent ( options ) {
Original file line number Diff line number Diff line change @@ -20,14 +20,6 @@ describe('Options name', () => {
20
20
/* eslint-enable */
21
21
} )
22
22
23
- it ( 'when incorrect name given it should not contain itself in self components' , ( ) => {
24
- const vm = Vue . extend ( {
25
- name : 'Hyper*Vue'
26
- } )
27
-
28
- expect ( vm . options . components [ 'Hyper*Vue' ] ) . toBeUndefined ( )
29
- } )
30
-
31
23
it ( 'id should not override given name when using Vue.component' , ( ) => {
32
24
const SuperComponent = Vue . component ( 'super-component' , {
33
25
name : 'SuperVue'
You can’t perform that action at this time.
0 commit comments