aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYilun Chong <chongyilun250@sina.com>2018-07-12 15:45:17 -0700
committerGitHub <noreply@github.com>2018-07-12 15:45:17 -0700
commitf21d4d6830a935da99c9aa107827c1d827768121 (patch)
treee43b3d9a22b710ec95cd0b451c44164ea7b30b4a
parent84752ff3168129c4c9fb3f50c4f0a5a196111c0f (diff)
parentf42ddff0ddc20184c4436ae274fcd19231142cdf (diff)
downloadprotobuf-f21d4d6830a935da99c9aa107827c1d827768121.tar.gz
protobuf-f21d4d6830a935da99c9aa107827c1d827768121.tar.bz2
protobuf-f21d4d6830a935da99c9aa107827c1d827768121.zip
Merge pull request #4903 from BSBandme/fix_js_build
fix commonjs js provide GOOGLE_CHECK
-rw-r--r--src/google/protobuf/compiler/js/js_generator.cc2
1 files changed, 1 insertions, 1 deletions
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);