diff --git a/src/common/mixins/ComputeActionsMixin.js b/src/common/mixins/ComputeActionsMixin.js index 6fd6e5d..d6726ab 100644 --- a/src/common/mixins/ComputeActionsMixin.js +++ b/src/common/mixins/ComputeActionsMixin.js @@ -1,7 +1,13 @@ export default { computed: { scopeActions: function() { - return this.settings.active.actions.filter(x => x.scopes[this.scope] && x.scopes[this.scope].show) || []; + return this.settings.active.actions.filter(x => { + if (! x.scopes) { + console.error('This action does not have a scope.', x); + return false; + } + return x.scopes[this.scope] && x.scopes[this.scope].show + }) || []; }, extensionActions: function(){ return this.scopeActions.filter(x => x.cmd.length === 1 && x.cmd[0].action === 'set-extension-mode') || []; diff --git a/src/ext/conf/ExtensionConf.js b/src/ext/conf/ExtensionConf.js index 73d227a..adf08e5 100644 --- a/src/ext/conf/ExtensionConf.js +++ b/src/ext/conf/ExtensionConf.js @@ -512,6 +512,8 @@ var ExtensionConf = { playerUi: { show: true, path: 'zoom' + }, + scopes: { } }, { name: 'Hold to pan',