Skip to content

Commit 1550d44

Browse files
committed
Fix some new ts errors/warnings
1 parent e71a957 commit 1550d44

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/docsBrowser.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export namespace DocsBrowser {
4747
enableScripts: true,
4848
});
4949

50-
const encoded = encodeURIComponent(JSON.stringify({ hackageUri: hackageUri, inWebView: true }));
50+
const encoded = encodeURIComponent(JSON.stringify({ hackageUri, inWebView: true }));
5151
const hackageCmd = 'command:haskell.openDocumentationOnHackage?' + encoded;
5252

5353
const bytes = await workspace.fs.readFile(Uri.parse(localPath));
@@ -146,7 +146,7 @@ export namespace DocsBrowser {
146146
/\[(.+)\]\((file:.+\/doc\/(?:.*html\/libraries\/)?([^\/]+)\/(?:.*\/)?(.+\.html#?.*))\)/gi,
147147
(all, title, localPath, packageName, fileAndAnchor) => {
148148
let hackageUri: string;
149-
if (title == 'Documentation') {
149+
if (title === 'Documentation') {
150150
hackageUri = `https://hackage.haskell.org/package/${packageName}/docs/${fileAndAnchor}`;
151151
const encoded = encodeURIComponent(JSON.stringify({ title, localPath, hackageUri }));
152152
let cmd: string;
@@ -156,7 +156,7 @@ export namespace DocsBrowser {
156156
cmd = 'command:haskell.showDocumentation?' + encoded;
157157
}
158158
return `[${title}](${cmd})`;
159-
} else if (title == 'Source') {
159+
} else if (title === 'Source') {
160160
hackageUri = `https://hackage.haskell.org/package/${packageName}/docs/src/${fileAndAnchor.replace(
161161
/-/gi,
162162
'.'

0 commit comments

Comments
 (0)