From e82b783ffbaf29393d6908b0c06261ef710db6f6 Mon Sep 17 00:00:00 2001 From: Frangu Vlad Date: Wed, 7 Feb 2018 14:38:15 +0200 Subject: [PATCH] Fix image null (#43) --- src/data/languages.json | 1 + src/extension.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/data/languages.json b/src/data/languages.json index 56d9b08..c546bb0 100644 --- a/src/data/languages.json +++ b/src/data/languages.json @@ -37,6 +37,7 @@ "haskell", "html", "haxe", + "ini", "pug", "jar", "java", diff --git a/src/extension.ts b/src/extension.ts index 051c52d..8aefa22 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -249,7 +249,7 @@ function setActivity(workspaceElapsedTime: boolean = false): void { || largeImageKey : 'txt', largeImageText: window.activeTextEditor - ? config.get('largeImage').replace('{lang}', largeImageKey.image || largeImageKey).replace('{LANG}', largeImageKey.image.toUpperCase() || largeImageKey.toUpperCase()) + ? config.get('largeImage').replace('{lang}', largeImageKey ? largeImageKey.image || largeImageKey : "txt").replace('{LANG}', largeImageKey ? (largeImageKey.image || largeImageKey).toUpperCase() : "TXT") || window.activeTextEditor.document.languageId.padEnd(2, '\u200b') : config.get('largeImageIdle'), smallImageKey: debug.activeDebugSession