From 488f7b92ae14efc335802f6b48720073ac1c3618 Mon Sep 17 00:00:00 2001 From: Eric Vergnaud Date: Mon, 14 Sep 2015 23:34:52 +0800 Subject: [PATCH] was failing when ran in NodeJS --- runtime/JavaScript/src/antlr4/FileStream.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/JavaScript/src/antlr4/FileStream.js b/runtime/JavaScript/src/antlr4/FileStream.js index 8359c0333..664056155 100644 --- a/runtime/JavaScript/src/antlr4/FileStream.js +++ b/runtime/JavaScript/src/antlr4/FileStream.js @@ -34,7 +34,7 @@ // when you construct the object. // var InputStream = require('./InputStream').InputStream; -var isNodeJs = typeof window === 'undefined' && importScripts === 'undefined'; +var isNodeJs = typeof window === 'undefined' && typeof importScripts === 'undefined'; var fs = isNodeJs ? require("fs") : null; function FileStream(fileName) {