File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import { getMetadataKey } from './functions';
12
12
// LWC can have child folders (ex: dynamic templates like /templates/noDataIllustration.html
13
13
const pathAfterFullName = ( fileResponse : RemoteSyncInput ) : string =>
14
14
fileResponse && fileResponse . filePath
15
- ? fileResponse . filePath . substr ( fileResponse . filePath . indexOf ( fileResponse . fullName ) ) . replace ( / \\ / gi, '/' )
15
+ ? fileResponse . filePath . substr ( fileResponse . filePath . lastIndexOf ( fileResponse . fullName ) ) . replace ( / \\ / gi, '/' )
16
16
: '' ;
17
17
18
18
const registry = new RegistryAccess ( ) ;
@@ -30,7 +30,7 @@ export const getMetadataKeyFromFileResponse = (fileResponse: RemoteSyncInput): s
30
30
// also create an element for the parent object
31
31
if ( fileResponse . type === 'CustomField' && fileResponse . filePath ) {
32
32
const splits = path . normalize ( fileResponse . filePath ) . split ( path . sep ) ;
33
- const objectFolderIndex = splits . indexOf ( 'objects' ) ;
33
+ const objectFolderIndex = splits . lastIndexOf ( 'objects' ) ;
34
34
return [
35
35
getMetadataKey ( 'CustomObject' , splits [ objectFolderIndex + 1 ] ) ,
36
36
getMetadataKey ( fileResponse . type , fileResponse . fullName ) ,
You can’t perform that action at this time.
0 commit comments