Attempt to fix watcher issue with repl.it

This commit is contained in:
Jarred Sumner
2021-12-31 17:52:38 -08:00
parent eb142a6be5
commit d068d80ab9
6 changed files with 29 additions and 12 deletions

View File

@@ -1138,7 +1138,8 @@ pub const VirtualMachine = struct {
if (vm.watcher) |watcher| {
if (watcher.indexOf(hash)) |index| {
fd = watcher.watchlist.items(.fd)[index];
const _fd = watcher.watchlist.items(.fd)[index];
fd = if (_fd > 0) _fd else null;
package_json = watcher.watchlist.items(.package_json)[index];
}
}