From 83d84e5a93873f2ef73ce5fc956a2a764f6f8531 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Sun, 27 Oct 2019 23:20:45 +0100 Subject: [PATCH] Fix popup not displaying --- src/common/mixins/ComputeActionsMixin.js | 8 +++++++- src/ext/conf/ExtensionConf.js | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) 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',