Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/jwunderl/dont error on empty response #10185

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions webapp/src/fileworkspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export function setApiAsync(f: (path: string, data?: any) => Promise<any>) {
function getAsync(h: Header) {
return apiAsync("pkg/" + h.path)
.then((resp: pxt.FsPkg) => {
if (!resp.files) {
return undefined;
}
let r: pxt.workspace.File = {
header: h,
text: {},
Expand Down
7 changes: 6 additions & 1 deletion webapp/src/timeMachine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,14 @@ export const TimeMachine = (props: TimeMachineProps) => {
"controller",
"skillsMap",
"noproject",
"nocookiebanner"
"nocookiebanner",
];

const localToken = pxt.storage.getLocal("local_token");
if (localToken) {
queryParams.push(`local_token=${localToken}`);
}

if (pxt.appTarget?.appTheme.timeMachineQueryParams) {
queryParams = queryParams.concat(pxt.appTarget.appTheme.timeMachineQueryParams);
}
Expand Down