cleanup: Disambiguate assignments in arrow functions
As arrow functions have an implicit return value, an assignment of this.foo = bar could have been intended as a this.foo === bar comparison. To catch those errors, we will disallow these kinds of assignments unless they are marked explicitly by an extra pair of parentheses. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731
This commit is contained in:
@ -624,7 +624,7 @@ var NetworkAgent = class {
|
||||
this._pluginDir = Gio.file_new_for_path(Config.VPNDIR);
|
||||
try {
|
||||
let monitor = this._pluginDir.monitor(Gio.FileMonitorFlags.NONE, null);
|
||||
monitor.connect('changed', () => this._vpnCacheBuilt = false);
|
||||
monitor.connect('changed', () => (this._vpnCacheBuilt = false));
|
||||
} catch (e) {
|
||||
log(`Failed to create monitor for VPN plugin dir: ${e.message}`);
|
||||
}
|
||||
|
Reference in New Issue
Block a user