check for undefined (#7277)

This commit is contained in:
Anthony Dresser
2019-09-18 14:53:13 -07:00
committed by GitHub
parent 510c45b9b7
commit b7299e5eec

View File

@@ -81,7 +81,7 @@ export abstract class Task {
constructor(private opts: ITaskOptions) {
this.id = opts.id;
this.title = opts.title;
if (opts.iconPath.dark) {
if (opts.iconPath) {
this.iconPath = {
dark: URI.parse(opts.iconPath.dark),
light: opts.iconPath.light ? URI.parse(opts.iconPath.light) : undefined,