diff --git a/js/misc/signalTracker.js b/js/misc/signalTracker.js index 30de94e99..1c3f4f9df 100644 --- a/js/misc/signalTracker.js +++ b/js/misc/signalTracker.js @@ -211,10 +211,7 @@ function connectObject(thisObj, ...args) { args = rest; } - let [obj] = args; - if (!obj) - obj = globalThis; - + const obj = args.at(0) ?? globalThis; const tracker = SignalManager.getDefault().getSignalTracker(thisObj); tracker.track(obj, ...signalIds); }