Skip to content

Commit

Permalink
Remove debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
heyman committed Dec 27, 2023
1 parent 8ffca54 commit ab0dae9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions electron/main/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,13 @@ export class Buffer {
if (filename !== basename(this.filePath)) {
return
}
//console.log("Buffer watcher event:", eventType, filename)


// read the file content and compare it to the last saved content
// (if the content is the same, then we can ignore the event)
const content = await jetpack.read(this.filePath, 'utf8')

if (this._lastSavedContent !== content) {
// file has changed on disk, trigger onChange
//console.log("real change detected")
this.onChange({filename, eventType, content})
}
}
Expand Down

0 comments on commit ab0dae9

Please sign in to comment.