signalTracker: Use a const variable to hold the tracked object value
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2366>
This commit is contained in:
parent
371da8d394
commit
9abf3508fd
@ -211,10 +211,7 @@ function connectObject(thisObj, ...args) {
|
|||||||
args = rest;
|
args = rest;
|
||||||
}
|
}
|
||||||
|
|
||||||
let [obj] = args;
|
const obj = args.at(0) ?? globalThis;
|
||||||
if (!obj)
|
|
||||||
obj = globalThis;
|
|
||||||
|
|
||||||
const tracker = SignalManager.getDefault().getSignalTracker(thisObj);
|
const tracker = SignalManager.getDefault().getSignalTracker(thisObj);
|
||||||
tracker.track(obj, ...signalIds);
|
tracker.track(obj, ...signalIds);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user