From f42ddff0ddc20184c4436ae274fcd19231142cdf Mon Sep 17 00:00:00 2001 From: Yilun Chong Date: Thu, 12 Jul 2018 13:47:16 -0700 Subject: fix commonjs js provide GOOGLE_CHECK --- src/google/protobuf/compiler/js/js_generator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/google/protobuf/compiler/js/js_generator.cc b/src/google/protobuf/compiler/js/js_generator.cc index d25a3668..45b906f5 100644 --- a/src/google/protobuf/compiler/js/js_generator.cc +++ b/src/google/protobuf/compiler/js/js_generator.cc @@ -1681,7 +1681,7 @@ void Generator::GenerateProvides(const GeneratorOptions& options, if (options.import_style == GeneratorOptions::kImportCommonJsStrict) { string namespaceObject = *it; // Remove "proto." from the namespace object - GOOGLE_CHECK(namespaceObject.compare(0, 6, "proto.")); + GOOGLE_CHECK(namespaceObject.compare(0, 6, "proto.") == 0); namespaceObject.erase(0, 6); printer->Print("goog.exportSymbol('$name$', null, proto);\n", "name", namespaceObject); -- cgit v1.2.3