1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-28 12:22:27 +01:00

Fixed the completion display issues

Fat-arrow function syntax has a lexical `this`, which causes
`this.groups` to be undefined, throwing an error upon sourcing. I
believe this is because it's pulling the `this` variable from the object
syntax constructor immediately surrounding it, instead of from the
completion.noscriptSites function, but I'm not positive.
This commit is contained in:
Evan Niessen-Derry
2016-06-29 22:18:04 -05:00
parent 05da8c52e2
commit 3cc3914a5c

View File

@@ -188,8 +188,10 @@ completion.noscriptSites = function (context) {
context.generate = getSites;
context.keys = {
text: util.identity,
description: site => groupDesc[this.highlight] +
(this.groups.untrusted && this.highlight != "NoScriptUntrusted" ? " (untrusted)" : ""),
description: function (site) {
return groupDesc[this.highlight] +
(this.groups.untrusted && this.highlight != "NoScriptUntrusted" ? " (untrusted)" : "")
},
highlight: function (site) {
return this.groups.temp ? "NoScriptTemp" :