|
|
@@ -263,8 +263,10 @@ SlackData.prototype.updateStatic = function(data, t) {
|
|
|
if (data.commands) {
|
|
|
var aliasCmd = {};
|
|
|
for (let i in data.commands)
|
|
|
- if (data.commands[i].canonical_name)
|
|
|
- aliasCmd[data.commands[i].canonical_name] = Object.create(Object.prototype, data.commands[i]);
|
|
|
+ if (data.commands[i].canonical_name && data.commands[i].canonical_name !== i) {
|
|
|
+ aliasCmd[data.commands[i].canonical_name] = {};
|
|
|
+ Object.assign(aliasCmd[data.commands[i].canonical_name], data.commands[i]);
|
|
|
+ }
|
|
|
for (let i in aliasCmd)
|
|
|
data.commands[i] = aliasCmd[i];
|
|
|
}
|