mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +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;
|
var utils, fs;
|
||||||
|
|
||||||
try {
|
if ('undefined' === typeof window) {
|
||||||
fs = require('fs');
|
fs = require('fs');
|
||||||
} catch (e) {}
|
}
|
||||||
|
|
||||||
|
|
||||||
module.exports = utils = {
|
module.exports = utils = {
|
||||||
|
|||||||
Reference in New Issue
Block a user