1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 19:30:21 +02:00

Handle scripts not returning promises

This commit is contained in:
Dominik Schmidt
2014-12-05 05:32:24 +01:00
parent 507df5317e
commit 8d15e12973

View File

@@ -607,7 +607,7 @@ Tomahawk.PluginManager = {
}, },
invoke: function (requestId, objectId, methodName, params ) { invoke: function (requestId, objectId, methodName, params ) {
this.objects[objectId][methodName](params).then(function (result) { Promise.resolve(this.objects[objectId][methodName](params)).then(function (result) {
if (typeof result === 'object') { if (typeof result === 'object') {
Tomahawk.reportScriptJobResults({ Tomahawk.reportScriptJobResults({
requestId: requestId, requestId: requestId,