diff --git a/package-lock.json b/package-lock.json index 3ed8c80..23f9977 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@codearts/core", - "version": "0.4.4", + "version": "0.4.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@codearts/core", - "version": "0.4.4", + "version": "0.4.5", "license": "SEE LICENSE IN LICENSE", "dependencies": { "@cloudide/messaging": "^0.1.0", diff --git a/package.json b/package.json index 3e96054..6d3159f 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "codearts", "plugin" ], - "version": "0.4.4", + "version": "0.4.5", "license": "SEE LICENSE IN LICENSE", "description": "core plugin api of cloudide frontend and backend", "repository": { diff --git a/src/node/plugin-api.ts b/src/node/plugin-api.ts index 4fe335f..b95af2c 100644 --- a/src/node/plugin-api.ts +++ b/src/node/plugin-api.ts @@ -246,8 +246,7 @@ export class Plugin { */ public async call(identifier: string, ...args: any[]): Promise { const viewType = identifier.indexOf('::') >= 0 ? identifier.substring(0, identifier.indexOf('::')) : ''; - const viewContainer = - this._container.size === 1 ? this._container.values().next().value : this._container.get(viewType); + const viewContainer = this._container.get(viewType); if (!viewContainer) { this.log(LogLevel.ERROR, `target view not exist: ${viewType}`); return Promise.reject(`target view not exist: ${viewType}`);