Skip to content

Commit

Permalink
no spurious error on asset editor response
Browse files Browse the repository at this point in the history
  • Loading branch information
jwunderl committed Sep 19, 2024
1 parent fe3898c commit fbd8456
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions localtypings/pxteditor.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1296,6 +1296,7 @@ declare namespace pxt.editor {

interface BaseAssetEditorResponse {
id?: number;
success: boolean;
}

interface OpenAssetEditorResponse extends BaseAssetEditorResponse {
Expand Down
12 changes: 8 additions & 4 deletions webapp/src/assetEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ export class AssetEditor extends React.Component<{}, AssetEditorState> {

this.sendResponse({
id: request.id,
type: request.type
type: request.type,
success: true
});
break;
case "open":
Expand All @@ -73,7 +74,8 @@ export class AssetEditor extends React.Component<{}, AssetEditorState> {
});
this.sendResponse({
id: request.id,
type: request.type
type: request.type,
success: true
});
break;
case "duplicate":
Expand All @@ -85,14 +87,16 @@ export class AssetEditor extends React.Component<{}, AssetEditorState> {
});
this.sendResponse({
id: request.id,
type: request.type
type: request.type,
success: true,
});
break;
case "save":
this.sendResponse({
id: request.id,
type: request.type,
files: this.saveProjectFiles()
files: this.saveProjectFiles(),
success: true
});
break;
}
Expand Down

0 comments on commit fbd8456

Please sign in to comment.