fix(#1804): do not refresh watched nodes that have been destroyed (deleted)
This commit is contained in:
@@ -99,6 +99,8 @@ function Event:destroy(message)
|
||||
end
|
||||
|
||||
Event._events[self._path] = nil
|
||||
|
||||
self.destroyed = true
|
||||
end
|
||||
|
||||
function Watcher:new(path, files, callback, data)
|
||||
@@ -139,6 +141,8 @@ function Watcher:destroy()
|
||||
self._event:remove(self._listener)
|
||||
|
||||
utils.array_remove(Watcher._watchers, self)
|
||||
|
||||
self.destroyed = true
|
||||
end
|
||||
|
||||
M.Watcher = Watcher
|
||||
|
||||
Reference in New Issue
Block a user