diff --git a/js/lib/apps/sdk.js b/js/lib/apps/sdk.js index 8f7d6ccdd..817944325 100644 --- a/js/lib/apps/sdk.js +++ b/js/lib/apps/sdk.js @@ -246,8 +246,8 @@ var BastyonSdk = function(){ return self.project.protocol + "://application?id=" + self.applicationInfo.id + (path ? (path ? '&p=' + hexEncode(path) : '') : (currentState ? '&p=' + hexEncode(currentState) : '')) }, - action : function(){ - return action('getaction', {}) + action : function(data){ + return action('getaction', data || {}) }, actions : function(){ diff --git a/js/lib/client/actions.js b/js/lib/client/actions.js index d9d5a7011..a90cd6b6e 100644 --- a/js/lib/client/actions.js +++ b/js/lib/client/actions.js @@ -2746,7 +2746,7 @@ var Actions = function(app, api, storage = localStorage){ if(!account) return actions _.each(account.actions.value, (a) => { - if(a.settings.application == application) actions.push(application) + if(a.settings.application == application) actions.push(a) }) return actions