1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
diff --git a/src/extension.ts b/src/extension.ts
index 11058efab6957c1e6e632d30957c086cb2a12414..91420975699d228dbe2e6a8b026c168967fde186 100755
--- a/src/extension.ts
+++ b/src/extension.ts
@@ -85,11 +85,13 @@ }
export function activate(context: ExtensionContext) {
let module = context.asAbsolutePath(path.join('dist', 'server', 'index.js'))
- let outputChannel: OutputChannel = Window.createOutputChannel(CLIENT_NAME)
+ let outputChannel: OutputChannel
context.subscriptions.push(
commands.registerCommand('tailwindCSS.showOutput', () => {
- outputChannel.show()
+ if (outputChannel) {
+ outputChannel.show()
+ }
})
)
@@ -153,6 +155,11 @@ languages.set(
folder.uri.toString(),
dedupe([...DEFAULT_LANGUAGES, ...Object.keys(getUserLanguages(folder))])
)
+ }
+
+ if (!outputChannel) {
+ outputChannel = Window.createOutputChannel(CLIENT_NAME)
+ commands.executeCommand('setContext', 'tailwindCSS.hasOutputChannel', true)
}
let serverOptions: ServerOptions = {
|