Skip to content

Commit 91df7a6

Browse files
committed
spam request time info in dev only
1 parent 7f63001 commit 91df7a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sendCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const sendCommand = async <T>(command: TriggerCharacterCommand, sendComma
1919
}
2020
})()
2121

22-
console.time(`request ${command}`)
22+
if (process.env.NODE_ENV === 'development') console.time(`request ${command}`)
2323
let requestFile = uri.fsPath
2424
if (uri.scheme !== 'file') requestFile = `^/${uri.scheme}/${uri.authority || 'ts-nul-authority'}/${uri.path.replace(/^\//, '')}`
2525
try {
@@ -34,7 +34,7 @@ export const sendCommand = async <T>(command: TriggerCharacterCommand, sendComma
3434
} catch (err) {
3535
console.error(err)
3636
} finally {
37-
console.timeEnd(`request ${command}`)
37+
if (process.env.NODE_ENV === 'development') console.timeEnd(`request ${command}`)
3838
}
3939

4040
return undefined

0 commit comments

Comments
 (0)