Skip to content

Commit

Permalink
fix: Get response with decoded URI (#121)
Browse files Browse the repository at this point in the history
* Get response with decoded URI

fix: #120

* try to remove unneccessary type notation for return value

* use "_documents.get" instead of checking equality
  • Loading branch information
kyoh86 committed Dec 10, 2023
1 parent c09af93 commit c684cbe
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/service/src/shims/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,8 @@ export class WorkspaceShimService extends Disposable {
return result;
}

$getDocumentByLspUri(uri: lsp.URI): TextDocument | undefined {
for (const doc of this._documents.values()) {
if (doc.uri == uri) {
return doc;
}
}
$getDocumentByLspUri(uri: lsp.URI) {
return this._documents.get(URI.parse(uri));
}

get workspaceFolders(): vscode.WorkspaceFolder[] {
Expand Down

0 comments on commit c684cbe

Please sign in to comment.