Skip to content

Commit d47a102

Browse files
authored
Update index.common.ts
1 parent 9de6b32 commit d47a102

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ui-carto/index.common.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ export function getFileName(str: string): string {
154154

155155
export function getRelativePathToApp(str: string) {
156156
const filePath = getFileName(str);
157+
if (!currentAppFolder) {
158+
currentAppFolder = knownFolders.currentApp().path;
159+
}
157160
const toReplace = currentAppFolder.split('/').slice(0, -1).join('/');
158161
if (filePath.indexOf(toReplace) === 0) {
159162
return filePath.replace(toReplace, '').slice(1);

0 commit comments

Comments
 (0)