summaryrefslogtreecommitdiff
path: root/ext/bg/js/profile-conditions.js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2020-05-06 19:44:56 +0300
committerGitHub <noreply@github.com>2020-05-06 19:44:56 +0300
commit253dcf8b38c6ef2bec1a524db70e30ac7b1817c5 (patch)
tree6f28335b0b30f8b89d0353bd17ee57a85455246c /ext/bg/js/profile-conditions.js
parenta1f8f0d1de7286a55c97a783504b23bd76740e50 (diff)
Fix modifier key condition data (#506)
* save transformed data for modifier key conditions * validate transformed input * fix regression * undo rename * refactor transformInput handling * don't overwrite value with null
Diffstat (limited to 'ext/bg/js/profile-conditions.js')
-rw-r--r--ext/bg/js/profile-conditions.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/bg/js/profile-conditions.js b/ext/bg/js/profile-conditions.js
index c0f5d3f5..32309c64 100644
--- a/ext/bg/js/profile-conditions.js
+++ b/ext/bg/js/profile-conditions.js
@@ -128,9 +128,9 @@ const profileConditionsDescriptor = {
are: {
name: 'are',
placeholder: 'Press one or more modifier keys here',
- defaultValue: '',
+ defaultValue: [],
type: 'keyMulti',
- transform: (optionValue) => optionValue
+ transformInput: (optionValue) => optionValue
.split(' + ')
.filter((v) => v.length > 0)
.map((v) => _profileModifierNameToValue.get(v)),
@@ -142,9 +142,9 @@ const profileConditionsDescriptor = {
areNot: {
name: 'are not',
placeholder: 'Press one or more modifier keys here',
- defaultValue: '',
+ defaultValue: [],
type: 'keyMulti',
- transform: (optionValue) => optionValue
+ transformInput: (optionValue) => optionValue
.split(' + ')
.filter((v) => v.length > 0)
.map((v) => _profileModifierNameToValue.get(v)),