File tree 1 file changed +14
-13
lines changed
1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -59,21 +59,22 @@ extend( Repo.prototype, {
59
59
errors . push ( "Missing required field: name." ) ;
60
60
} else if ( typeof package . name !== "string" ) {
61
61
errors . push ( "Invalid data type for name; must be a string." ) ;
62
- }
63
- if ( prefix ) {
64
- if ( package . name . indexOf ( prefix ) !== 0 ) {
65
- errors . push ( "Name must start with '" + prefix + "'." ) ;
66
- }
67
62
} else {
68
- if ( package . name . indexOf ( "jquery." ) !== 0 ) {
69
- errors . push ( "Name must start with 'jquery.'." ) ;
63
+ if ( prefix ) {
64
+ if ( package . name . indexOf ( prefix ) !== 0 ) {
65
+ errors . push ( "Name must start with '" + prefix + "'." ) ;
66
+ }
70
67
} else {
71
- Object . keys ( suites ) . forEach ( function ( repoId ) {
72
- var prefix = suites [ repoId ] ;
73
- if ( package . name . indexOf ( prefix ) === 0 ) {
74
- errors . push ( "Name must not start with '" + prefix + "'." ) ;
75
- }
76
- } ) ;
68
+ if ( package . name . indexOf ( "jquery." ) !== 0 ) {
69
+ errors . push ( "Name must start with 'jquery.'." ) ;
70
+ } else {
71
+ Object . keys ( suites ) . forEach ( function ( repoId ) {
72
+ var prefix = suites [ repoId ] ;
73
+ if ( package . name . indexOf ( prefix ) === 0 ) {
74
+ errors . push ( "Name must not start with '" + prefix + "'." ) ;
75
+ }
76
+ } ) ;
77
+ }
77
78
}
78
79
}
79
80
You can’t perform that action at this time.
0 commit comments