From 44f8bf00bc65b3e913b05ad85893157b0e62b992 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Sun, 22 Oct 2017 17:14:11 -0700 Subject: [PATCH] move remoteCallerID to Script.remoteCallerID --- libraries/script-engine/src/ScriptEngine.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/script-engine/src/ScriptEngine.cpp b/libraries/script-engine/src/ScriptEngine.cpp index 3df69f6f0d..98846c5213 100644 --- a/libraries/script-engine/src/ScriptEngine.cpp +++ b/libraries/script-engine/src/ScriptEngine.cpp @@ -2531,10 +2531,10 @@ void ScriptEngine::callEntityScriptMethod(const EntityItemID& entityID, const QS args << entityID.toScriptValue(this); args << qScriptValueFromSequence(this, params); - QScriptValue oldData = this->globalObject().property("remoteCallerID"); - this->globalObject().setProperty("remoteCallerID", remoteCallerID.toString()); // Make the remoteCallerID available to javascript as a global. + QScriptValue oldData = this->globalObject().property("Script").property("remoteCallerID"); + this->globalObject().property("Script").setProperty("remoteCallerID", remoteCallerID.toString()); // Make the remoteCallerID available to javascript as a global. callWithEnvironment(entityID, details.definingSandboxURL, entityScript.property(methodName), entityScript, args); - this->globalObject().setProperty("remoteCallerID", oldData); + this->globalObject().property("Script").setProperty("remoteCallerID", oldData); } } }