Skip to content

Commit

Permalink
Fix unsame member access on type 'any'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jade Clark-Muth committed Apr 26, 2024
1 parent 74d2d5c commit 187e5c0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/workspace/listLocalFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import { type FunctionEnvelope } from "@azure/arm-appservice";
import { type AzExtPipelineResponse } from '@microsoft/vscode-azext-azureutils';
import { AzExtFsExtra, callWithTelemetryAndErrorHandling, nonNullProp, parseError, type IActionContext } from "@microsoft/vscode-azext-utils";
import { functionJsonFileName } from "../constants";
import { ParsedFunctionJson } from "../funcConfig/function";
Expand Down Expand Up @@ -79,7 +80,7 @@ async function getFunctionsForHostedProject(context: IActionContext, project: Lo
const hostRequest = await project.getHostRequest(context);
const timeout = getHostStartTimeoutMS();
const startTime = Date.now();
let functions;
let functions: AzExtPipelineResponse | undefined = undefined;
let retry = true;
while (retry) {
retry = false;
Expand All @@ -106,10 +107,12 @@ async function getFunctionsForHostedProject(context: IActionContext, project: Lo
}
}

return (<FunctionEnvelope[]>functions.parsedBody).map(func => {
func = requestUtils.convertToAzureSdkObject(func);
return new LocalFunction(project, nonNullProp(func, 'name'), new ParsedFunctionJson(func.config), func);
});
if (functions !== undefined) {
return (<FunctionEnvelope[]>functions.parsedBody).map(func => {
func = requestUtils.convertToAzureSdkObject(func);
return new LocalFunction(project, nonNullProp(func, 'name'), new ParsedFunctionJson(func.config), func);
});
}
} else {
throw new ProjectNotRunningError();
}
Expand Down

0 comments on commit 187e5c0

Please sign in to comment.