Skip to content

Commit 3957e39

Browse files
committed
Changed downloadProject to take a Project instead of a projectName (string).
1 parent b46119d commit 3957e39

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/reactComponents/Menu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ export function Component(props: MenuProps): React.JSX.Element {
336336
}
337337

338338
try {
339-
const blobUrl = await storageProject.downloadProject(props.storage, props.project.projectName);
339+
const blobUrl = await storageProject.downloadProject(props.storage, props.project);
340340
const filename = props.project.projectName + storageNames.UPLOAD_DOWNLOAD_FILE_EXTENSION;
341341

342342
// Create a temporary link to download the file

src/storage/project.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,9 @@ export function findModuleByModulePath(project: Project, modulePath: string): st
396396
* Produce the blob for downloading a project.
397397
*/
398398
export async function downloadProject(
399-
storage: commonStorage.Storage, projectName: string): Promise<string> {
399+
storage: commonStorage.Storage, project: Project): Promise<string> {
400400
const pathToModuleContent = await storage.listModules(
401-
storageNames.makeModulePathRegexPattern(projectName));
401+
storageNames.makeModulePathRegexPattern(project.projectName));
402402

403403
const classNameToModuleContentText: {[className: string]: string} = {}; // value is module content text
404404
for (const modulePath in pathToModuleContent) {

0 commit comments

Comments
 (0)