Fixed JS outputting helper for Int64Array.

Change-Id: I7d23fa3416feb78ea18d2c451e7b4e1d9be11bfc
diff --git a/include/flatbuffers/idl.h b/include/flatbuffers/idl.h
index 6ae8dd2..7fe3379 100644
--- a/include/flatbuffers/idl.h
+++ b/include/flatbuffers/idl.h
@@ -102,6 +102,8 @@
                                            t <= BASE_TYPE_ULONG; }
 inline bool IsFloat  (BaseType t) { return t == BASE_TYPE_FLOAT ||
                                            t == BASE_TYPE_DOUBLE; }
+inline bool IsLong   (BaseType t) { return t == BASE_TYPE_LONG ||
+                                           t == BASE_TYPE_ULONG; }
 
 extern const char *const kTypeNames[];
 extern const char kTypeSizes[];
diff --git a/src/idl_gen_js.cpp b/src/idl_gen_js.cpp
index 32c660c..dd04bec 100644
--- a/src/idl_gen_js.cpp
+++ b/src/idl_gen_js.cpp
@@ -576,7 +576,7 @@
 
       // For scalar types, emit a typed array helper
       auto vectorType = field.value.type.VectorType();
-      if (IsScalar(vectorType.base_type)) {
+      if (IsScalar(vectorType.base_type) && !IsLong(vectorType.base_type)) {
         GenDocComment(code_ptr, "@returns {" + GenType(vectorType) + "Array}");
         code += object_name + ".prototype." + MakeCamel(field.name, false);
         code += "Array = function() {\n" + offset_prefix;