From 90864357c3e4c0fbf7ea8d1ce9225ad3784c04a6 Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdxcode@users.noreply.github.com> Date: Fri, 16 Feb 2018 17:02:46 -0800 Subject: [PATCH] fix: make plugin optional for single-command support --- src/command.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/command.ts b/src/command.ts index 57ad6814..f9dda618 100644 --- a/src/command.ts +++ b/src/command.ts @@ -77,13 +77,13 @@ export namespace Command { load(): Class } - export function toCached(c: Class, plugin: Config.Plugin): Command { + export function toCached(c: Class, plugin?: Config.Plugin): Command { return { id: c.id, description: c.description, usage: c.usage, - pluginName: plugin.name, - pluginType: plugin.type, + pluginName: plugin && plugin.name, + pluginType: plugin && plugin.type, hidden: c.hidden, aliases: c.aliases || [], examples: c.examples || (c as any).example,