Skip to content

Commit fbae9fe

Browse files
authored
Fix creation of new file header when objectscript.export.folder is empty (#1604)
1 parent b28eab8 commit fbae9fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
13071307
const filePathNoWorkspaceArr = uri.fsPath.replace(workspacePath + path.sep, "").split(path.sep);
13081308
const { folder, addCategory } = config("export", workspace);
13091309
const expectedFolder = typeof folder === "string" && folder.length ? folder : null;
1310-
const expectedFolderArr = expectedFolder.split(path.sep);
1310+
const expectedFolderArr = expectedFolder ? expectedFolder.split(path.sep) : [];
13111311
if (
13121312
expectedFolder !== null &&
13131313
filePathNoWorkspaceArr.slice(0, expectedFolderArr.length).join(path.sep) === expectedFolder

0 commit comments

Comments
 (0)