mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-04-07 14:09:12 +08:00
Fix bug with async plugin methods
This commit is contained in:
@ -1144,12 +1144,12 @@
|
||||
}
|
||||
|
||||
let currentCommand = this.queueCommands.shift();
|
||||
let runObject = this.runnedPluginsMap[currentCommand.guid];
|
||||
|
||||
// send callback
|
||||
let pluginDataTmp = undefined;
|
||||
if (!currentCommand.closed)
|
||||
if (!currentCommand.closed && runObject)
|
||||
{
|
||||
pluginDataTmp = new CPluginData();
|
||||
let pluginDataTmp = new CPluginData();
|
||||
pluginDataTmp.setAttribute("guid", currentCommand.guid);
|
||||
|
||||
if (currentCommand.type === CommandTaskType.Command)
|
||||
@ -1161,11 +1161,10 @@
|
||||
{
|
||||
pluginDataTmp.setAttribute("type", "onMethodReturn");
|
||||
pluginDataTmp.setAttribute("methodReturnData", returnValue);
|
||||
runObject.methodReturnAsync = false;
|
||||
}
|
||||
|
||||
let runObject = this.runnedPluginsMap[currentCommand.guid];
|
||||
if (runObject)
|
||||
this.sendMessageToFrame(runObject.isConnector ? "" : runObject.frameId, pluginDataTmp);
|
||||
this.sendMessageToFrame(runObject.isConnector ? "" : runObject.frameId, pluginDataTmp);
|
||||
}
|
||||
|
||||
if (this.queueCommands.length > 0)
|
||||
|
||||
Reference in New Issue
Block a user