summaryrefslogtreecommitdiff
path: root/cpp/src/slice2js
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2js')
-rw-r--r--cpp/src/slice2js/Gen.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/cpp/src/slice2js/Gen.cpp b/cpp/src/slice2js/Gen.cpp
index a95735661f6..1542b04f8fd 100644
--- a/cpp/src/slice2js/Gen.cpp
+++ b/cpp/src/slice2js/Gen.cpp
@@ -835,7 +835,7 @@ Slice::Gen::TypesVisitor::visitModuleStart(const ModulePtr& p)
//
// For an inner module we write
//
- // Foo.Bar = global.Foo ? (global.Foo.Bar || {}) : {};
+ // Foo.Bar = Foo.Bar || {};
//
const string scoped = getLocalScope(p->scoped());
@@ -850,8 +850,7 @@ Slice::Gen::TypesVisitor::visitModuleStart(const ModulePtr& p)
}
else
{
- _out << nl << scoped << " = global." << getLocalScope(p->scope()) << " ? (global." << scoped
- << " || {}) : {};";
+ _out << nl << scoped << " = " << scoped << " || {};";
}
}
return true;