fix: Fixes an unhandled undefined, which causes theme to break (issue #69).
This commit is contained in:
parent
6c2ce83be8
commit
14a471fd0f
1 changed files with 8 additions and 4 deletions
|
@ -1,9 +1,11 @@
|
||||||
import * as vscode from 'vscode';
|
|
||||||
import { getDefaultValues, getPackageJSON, getAbsolutePath } from "../../helpers/fs";
|
|
||||||
import { setCustomSettings, getCustomSettings } from "../../helpers/settings";
|
|
||||||
import { THEME_ICONS } from "../theme-icons/index";
|
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
|
import * as vscode from 'vscode';
|
||||||
|
|
||||||
|
import { getAbsolutePath, getDefaultValues, getPackageJSON } from "../../helpers/fs";
|
||||||
|
import { getCustomSettings, setCustomSettings } from "../../helpers/settings";
|
||||||
|
|
||||||
import { CHARSET } from "../../consts/files";
|
import { CHARSET } from "../../consts/files";
|
||||||
|
import { THEME_ICONS } from "../theme-icons/index";
|
||||||
import { reloadWindow } from "../../helpers/vscode";
|
import { reloadWindow } from "../../helpers/vscode";
|
||||||
|
|
||||||
export const THEME_VARIANT = () => {
|
export const THEME_VARIANT = () => {
|
||||||
|
@ -14,6 +16,8 @@ export const THEME_VARIANT = () => {
|
||||||
options = options.filter(i => i !== packageJSON.contributes.themes[0].path);
|
options = options.filter(i => i !== packageJSON.contributes.themes[0].path);
|
||||||
|
|
||||||
vscode.window.showQuickPick(options).then((response: string) => {
|
vscode.window.showQuickPick(options).then((response: string) => {
|
||||||
|
if (!response) return;
|
||||||
|
|
||||||
let customSettings = getCustomSettings();
|
let customSettings = getCustomSettings();
|
||||||
let themepath: string = defaults.themeVariants[response];
|
let themepath: string = defaults.themeVariants[response];
|
||||||
let themeUITheme: string = defaults.themeVariantsUITheme[response];
|
let themeUITheme: string = defaults.themeVariantsUITheme[response];
|
||||||
|
|
Loading…
Reference in a new issue