make Assets.getMapping(path) actually return the mapping

This commit is contained in:
humbletim 2016-07-22 11:54:02 -04:00
parent 17a5fa040d
commit 3e0ef7d43a

View file

@ -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);
}