Skip to content

Commit 9b616ae

Browse files
committed
fix: console logs getting swallowed
1 parent a370421 commit 9b616ae

4 files changed

Lines changed: 6 additions & 9 deletions

File tree

dist/virtualfs.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/virtualfs.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/fslib_watch.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919
// jshint ignore: start
20-
/*global BroadcastChannel, globalObject*/
20+
/*global BroadcastChannel, globalObject, virtualfs*/
2121
/*eslint no-console: 0*/
2222
/*eslint strict: ["error", "global"]*/
2323

@@ -80,7 +80,9 @@ function _processFsWatchEvent(event, broadcast=true) {
8080
function _listenToExternalFsWatchEvents() {
8181
_setupBroadcastChannel();
8282
_channel.onmessage = async function(event) {
83-
console.log('External fs watch event: ', event.data);
83+
if(virtualfs.debugMode){
84+
console.log('External fs watch event: ', event.data);
85+
}
8486
_processFsWatchEvent(event.data, false);
8587
};
8688
}

src/virtualfs.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ globalObject.virtualfs = {
3636
};
3737

3838
console.log(`virtual fs started in debugMode:${virtualfs.debugMode} on environment: ${virtualfs.env}`);
39-
if(!virtualfs.debugMode){
40-
console.log = function () {
41-
// dont log anything
42-
};
43-
}
4439

4540
const {initFsLib} = require('./fslib');
4641
initFsLib(Filer);

0 commit comments

Comments
 (0)