mirror of
https://bitbucket.org/bellord13/kit.git
synced 2026-11-13 19:06:11 +03:00
fix
This commit is contained in:
+6
-8
@@ -399,11 +399,10 @@ window.kit = window.kit || {};
|
||||
if(data === undefined) {
|
||||
return;
|
||||
}
|
||||
if(!this.global.hasOwnProperty(key)) {
|
||||
this.global[key] = data;
|
||||
} else {
|
||||
console.warn('PluginManager.install: plugin ' + pluginId + ' already exist in kit ('+plugin.state+')');
|
||||
if(this.global.hasOwnProperty(key)) {
|
||||
console.warn(`PluginManager.install(${pluginId}): key ${key} overwritten in kit (${plugin.state}).`);
|
||||
}
|
||||
this.global[key] = data;
|
||||
if(Array.isArray(aliasList) && aliasList.length) {
|
||||
aliasList.forEach(function (alias) {
|
||||
setGlobalExtension(alias, [], data)
|
||||
@@ -579,17 +578,16 @@ window.kit = window.kit || {};
|
||||
if(this.plugins.hasOwnProperty(pluginId)) {
|
||||
return this.plugins[pluginId];
|
||||
}
|
||||
for (var _pluginId in this.plugins) {
|
||||
var _pluginId;
|
||||
for (_pluginId in this.plugins) {
|
||||
if(this.plugins.hasOwnProperty(_pluginId) && this.plugins[_pluginId].config.alias.indexOf(pluginId) !== -1) {
|
||||
return this.plugins[_pluginId];
|
||||
}
|
||||
}
|
||||
|
||||
var _pluginId = pluginId[0].toUpperCase() + pluginId.slice(1);
|
||||
_pluginId = pluginId[0].toUpperCase() + pluginId.slice(1);
|
||||
if(_pluginId !== pluginId) {
|
||||
return this.__getPlugin(_pluginId);
|
||||
}
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user