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) {
2222 if ( isFirstExtend && extendOptions . _Ctor ) {
2323 return extendOptions . _Ctor
2424 }
25- let name = extendOptions . name || Super . options . name
25+ const name = extendOptions . name || Super . options . name
2626 if ( process . env . NODE_ENV !== 'production' ) {
2727 if ( ! / ^ [ a - z A - Z ] [ \w - ] * $ / . test ( name ) ) {
2828 warn (
2929 'Invalid component name: "' + name + '". Component names ' +
3030 'can only contain alphanumeric characaters and the hyphen.'
3131 )
32- name = null
3332 }
3433 }
3534 const Sub = function VueComponent ( options ) {
Original file line number Diff line number Diff line change @@ -20,14 +20,6 @@ describe('Options name', () => {
2020 /* eslint-enable */
2121 } )
2222
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-
3123 it ( 'id should not override given name when using Vue.component' , ( ) => {
3224 const SuperComponent = Vue . component ( 'super-component' , {
3325 name : 'SuperVue'
You can’t perform that action at this time.
0 commit comments