diff --git a/Nodejs/Product/Analysis/Analysis/NodejsModuleBuilder.Specializations.cs b/Nodejs/Product/Analysis/Analysis/NodejsModuleBuilder.Specializations.cs index cd29b2d96..db29f8402 100644 --- a/Nodejs/Product/Analysis/Analysis/NodejsModuleBuilder.Specializations.cs +++ b/Nodejs/Product/Analysis/Analysis/NodejsModuleBuilder.Specializations.cs @@ -341,8 +341,8 @@ private static IAnalysisSet FsBasename(FunctionValue func, Node node, AnalysisUn } private static IAnalysisSet FsReadDirSync(FunctionValue func, Node node, AnalysisUnit unit, IAnalysisSet @this, IAnalysisSet[] args) { - CallNode call = (CallNode)node; - if (call.Arguments.Length == 1) { + var call = node as CallNode; + if (call != null && call.Arguments.Length == 1) { var ee = new ExpressionEvaluator(unit); IAnalysisSet arraySet; ReadDirSyncArrayValue array;