From 8d15e12973b6000ff112c0d6abc0888e167802ff Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Fri, 5 Dec 2014 05:32:24 +0100 Subject: [PATCH] Handle scripts not returning promises --- data/js/tomahawk.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/js/tomahawk.js b/data/js/tomahawk.js index 7832725c9..b54f66b37 100644 --- a/data/js/tomahawk.js +++ b/data/js/tomahawk.js @@ -607,7 +607,7 @@ Tomahawk.PluginManager = { }, 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') { Tomahawk.reportScriptJobResults({ requestId: requestId,