소스 검색

Revert "Remove unused f expression from jscode gen. (#5573)"

The removed variable here is actually used breaking downstream bazel
builds.
Daniel Kurka 6 년 전
부모
커밋
e2461b5f59
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/google/protobuf/compiler/js/js_generator.cc

+ 1 - 1
src/google/protobuf/compiler/js/js_generator.cc

@@ -2272,7 +2272,7 @@ void Generator::GenerateClassToObject(const GeneratorOptions& options,
       " * @suppress {unusedLocalVariables} f is only used for nested messages\n"
       " */\n"
       "$classname$.toObject = function(includeInstance, msg) {\n"
-      "  var obj = {",
+      "  var f, obj = {",
       "classname", GetMessagePath(options, desc));
 
   bool first = true;