From cdd5f2d250d23571c47e344a2d2631b75436300d Mon Sep 17 00:00:00 2001 From: MiaoWoo Date: Fri, 20 Sep 2019 09:09:29 +0800 Subject: [PATCH] fix: command registry error Signed-off-by: MiaoWoo --- packages/plugin/src/decorators.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugin/src/decorators.ts b/packages/plugin/src/decorators.ts index f8c4c812..19806147 100644 --- a/packages/plugin/src/decorators.ts +++ b/packages/plugin/src/decorators.ts @@ -1,7 +1,7 @@ import { interfaces } from './interfaces' import { METADATA_KEY } from './constants' import { injectable, decorate } from "inversify"; -import { getPluginMetadatas, getPluginCommandMetadata, getPluginListenerMetadata } from './utils' +import { getPluginMetadatas, getPluginCommandMetadata, getPluginListenerMetadata, getPluginTabCompleterMetadata } from './utils' /** * MiaoScript plugin @@ -43,7 +43,7 @@ export function tab(metadata: interfaces.TabCompleterMetadata = {}) { metadata.name = metadata.name || key; metadata.executor = key; metadata.paramtypes = Reflect.getMetadata("design:paramtypes", target, key) - const previousMetadata: Map = getPluginCommandMetadata(target) + const previousMetadata: Map = getPluginTabCompleterMetadata(target) previousMetadata.set(metadata.name, metadata) Reflect.defineMetadata(METADATA_KEY.tab, previousMetadata, target.constructor); };