From a127fcd05647ac45af6f7334da951afbe17e4ced Mon Sep 17 00:00:00 2001 From: Denis Wolf Date: Mon, 28 Oct 2013 23:55:45 +0200 Subject: [PATCH] utils.js - detect node/browser with IF, not silent TRY/CATCH --- public/src/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 = {