mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-07 02:04:11 +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:
@@ -188,8 +188,10 @@ completion.noscriptSites = function (context) {
|
|||||||
context.generate = getSites;
|
context.generate = getSites;
|
||||||
context.keys = {
|
context.keys = {
|
||||||
text: util.identity,
|
text: util.identity,
|
||||||
description: site => groupDesc[this.highlight] +
|
description: function (site) {
|
||||||
(this.groups.untrusted && this.highlight != "NoScriptUntrusted" ? " (untrusted)" : ""),
|
return groupDesc[this.highlight] +
|
||||||
|
(this.groups.untrusted && this.highlight != "NoScriptUntrusted" ? " (untrusted)" : "")
|
||||||
|
},
|
||||||
|
|
||||||
highlight: function (site) {
|
highlight: function (site) {
|
||||||
return this.groups.temp ? "NoScriptTemp" :
|
return this.groups.temp ? "NoScriptTemp" :
|
||||||
|
|||||||
Reference in New Issue
Block a user