mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
background: Add exception to no-loop-func rule
Modifying variables from an outer scope in functions created in a loop is considered problematic by eslint, because the variable value in the resulting closure is often not what the coder intended. In this particular case however, the scoping is correct, so add a comment to disable the rule locally. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/818
This commit is contained in:
parent
a32c4f30d1
commit
66fc5c07bb
1 changed files with 1 additions and 0 deletions
|
|
@ -403,6 +403,7 @@ var Background = GObject.registerClass({
|
|||
if (numPendingImages == 0)
|
||||
finish();
|
||||
} else {
|
||||
// eslint-disable-next-line no-loop-func
|
||||
let id = image.connect('loaded', () => {
|
||||
image.disconnect(id);
|
||||
numPendingImages--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue