Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
fix: make plugin optional for single-command support
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 17, 2018
1 parent 6e1f6f7 commit 9086435
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9086435

Please sign in to comment.