Fix the script console not working directly after deploying a new script

This commit is contained in:
Michael Zanetti 2021-06-18 22:47:34 +02:00
parent 62a8f39b75
commit c3a3e9a59a

View File

@ -148,7 +148,10 @@ Page {
Connections { Connections {
target: engine.scriptManager target: engine.scriptManager
onAddScriptReply: deployReply(id, scriptError, errors) onAddScriptReply: {
deployReply(id, scriptError, errors)
d.scriptId = scriptId;
}
onEditScriptReply: deployReply(id, scriptError, errors) onEditScriptReply: deployReply(id, scriptError, errors)
function deployReply(id, scriptError, errors) { function deployReply(id, scriptError, errors) {
if (id === d.callId) { if (id === d.callId) {
@ -186,6 +189,7 @@ Page {
} }
onScriptMessage: { onScriptMessage: {
print("scriptMessage:", scriptId, d.scriptId)
if (scriptId !== d.scriptId) { if (scriptId !== d.scriptId) {
return; return;
} }