mirror of
https://github.com/45Drives/cockpit-navigator.git
synced 2025-07-31 01:24:37 +02:00
short circuit proxy set if no change
This commit is contained in:
parent
ad43980d3f
commit
e7db5106d0
@ -130,7 +130,9 @@ function FileSystemWatcher(path, options = {}, handlers = {}) {
|
||||
return new Proxy(self, {
|
||||
get: (target, prop) => target[prop],
|
||||
set: (target, prop, value) => {
|
||||
let restartChannel = ((prop === 'path' || prop === 'host') && target[prop] !== value);
|
||||
if (target[prop] === value)
|
||||
return true;
|
||||
let restartChannel = (prop === 'path' || prop === 'host');
|
||||
|
||||
if (restartChannel) {
|
||||
takeDownChannel();
|
||||
|
Loading…
x
Reference in New Issue
Block a user