Skip to content

Node.js based forum software built for the modern web

utils.js - detect node/browser with IF, not silent TRY/CATCH

Denis Wolfa127fcd05647
diff --git a/public/src/utils.js b/public/src/utils.js
index 885ab3f765..c6cf66d80a 100644
--- a/public/src/utils.js
+++ b/public/src/utils.js
@@ -3,9 +3,9 @@
var utils, fs;
- try {
+ if ('undefined' === typeof window) {
fs = require('fs');
- } catch (e) {}
+ }
module.exports = utils = {