Skip to content

Commit

Permalink
Fix playground Quick Fix action (#7824)
Browse files Browse the repository at this point in the history
## Summary

This PR fixes the playground code action to start working again. It seems that
the field name was changed from `edit` to `textEdit` in some version.

Resources:
- https://microsoft.github.io/monaco-editor/docs.html#interfaces/languages.IWorkspaceTextEdit.html
- https://stackoverflow.com/a/71742764

## Test Plan

Tested it out running locally.
  • Loading branch information
dhruvmanila authored Oct 5, 2023
1 parent 76fcf63 commit adb6580
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion playground/src/Editor/SourceEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default function SourceEditor({
edits: check.fix.edits.map((edit) => ({
resource: model.uri,
versionId: model.getVersionId(),
edit: {
textEdit: {
range: {
startLineNumber: edit.location.row,
startColumn: edit.location.column,
Expand Down

0 comments on commit adb6580

Please sign in to comment.