File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export default Ember.Mixin.create({
1010
1111 createFile ( filePath , fileProperties , fileColumn = 1 ) {
1212 if ( filePath ) {
13- if ( this . hasPath ( filePath ) ) {
13+ if ( this . hasPath ( filePath ) ) {
1414 alert ( `A file with the name ${ filePath } already exists` ) ;
1515 return ;
1616 }
@@ -32,8 +32,8 @@ export default Ember.Mixin.create({
3232 */
3333 isPathInvalid ( type , path ) {
3434 let errorMsg = null ;
35- if ( type . match ( / ^ c o m p o n e n t / ) ) {
36- if ( ! path . match ( / [ ^ \/ ] + - [ ^ \/ ] + ( \/ ( c o m p o n e n t \. j s | t e m p l a t e \. h b s ) ) ? $ / ) ) {
35+ if ( / ^ c o m p o n e n t / . test ( type ) ) {
36+ if ( ! / [ ^ \/ ] + - [ ^ \/ ] + ( \/ ( c o m p o n e n t \. j s | t e m p l a t e \. h b s ) ) ? $ / . test ( path ) ) {
3737 errorMsg = ErrorMessages . componentsNeedHyphens ;
3838 }
3939 }
@@ -77,7 +77,7 @@ export default Ember.Mixin.create({
7777 renameFile ( file ) {
7878 let filePath = prompt ( 'File path' , file . get ( 'filePath' ) ) ;
7979 if ( filePath ) {
80- if ( this . get ( 'model.files' ) . findBy ( 'filePath' , filePath ) ) {
80+ if ( this . get ( 'model.files' ) . findBy ( 'filePath' , filePath ) ) {
8181 alert ( `A file with the name ${ filePath } already exists` ) ;
8282 return ;
8383 }
You can’t perform that action at this time.
0 commit comments