mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
utils.js - detect node/browser with IF, not silent TRY/CATCH
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
|
||||
var utils, fs;
|
||||
|
||||
try {
|
||||
if ('undefined' === typeof window) {
|
||||
fs = require('fs');
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
|
||||
module.exports = utils = {
|
||||
|
||||
Reference in New Issue
Block a user