From 3e0ef7d43a0b8b8e563a66f80094055b20ffba4d Mon Sep 17 00:00:00 2001 From: humbletim Date: Fri, 22 Jul 2016 11:54:02 -0400 Subject: [PATCH] make Assets.getMapping(path) actually return the mapping --- interface/src/scripting/AssetMappingsScriptingInterface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/interface/src/scripting/AssetMappingsScriptingInterface.cpp b/interface/src/scripting/AssetMappingsScriptingInterface.cpp index f1198c9d5b..5a81fe8749 100644 --- a/interface/src/scripting/AssetMappingsScriptingInterface.cpp +++ b/interface/src/scripting/AssetMappingsScriptingInterface.cpp @@ -62,8 +62,10 @@ void AssetMappingsScriptingInterface::getMapping(QString path, QJSValue callback auto request = assetClient->createGetMappingRequest(path); connect(request, &GetMappingRequest::finished, this, [this, callback](GetMappingRequest* request) mutable { + auto hash = request->getHash(); + if (callback.isCallable()) { - QJSValueList args { request->getErrorString() }; + QJSValueList args { request->getErrorString(), hash }; callback.call(args); }