Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all
Unified · Split
| @@ -2531,10 +2531,10 @@ void ScriptEngine::callEntityScriptMethod(const EntityItemID& entityID, const QS · 2530 unmodified lines | ||
| 2531 | 2531 | args << entityID.toScriptValue(this); |
| 2532 | 2532 | args << qScriptValueFromSequence(this, params); |
| 2533 | 2533 | |
| 2534 | − QScriptValue oldData = this->globalObject().property("remoteCallerID"); | |
| 2535 | − this->globalObject().setProperty("remoteCallerID", remoteCallerID.toString()); // Make the remoteCallerID available to javascript as a global. | |
| 2534 | + QScriptValue oldData = this->globalObject().property("Script").property("remoteCallerID"); | |
| 2535 | + this->globalObject().property("Script").setProperty("remoteCallerID", remoteCallerID.toString()); // Make the remoteCallerID available to javascript as a global. | |
| 2536 | 2536 | callWithEnvironment(entityID, details.definingSandboxURL, entityScript.property(methodName), entityScript, args); |
| 2537 | − this->globalObject().setProperty("remoteCallerID", oldData); | |
| 2537 | + this->globalObject().property("Script").setProperty("remoteCallerID", oldData); | |
| 2538 | 2538 | } |
| 2539 | 2539 | } |
| 2540 | 2540 | } |