diff --git a/src/services/navigationBar.ts b/src/services/navigationBar.ts
index f381be9b7d1..d97004b80c5 100644
--- a/src/services/navigationBar.ts
+++ b/src/services/navigationBar.ts
@@ -277,7 +277,7 @@ namespace ts.NavigationBar {
case SpecialPropertyAssignmentKind.PrototypeProperty:
case SpecialPropertyAssignmentKind.Prototype:
addNodeWithRecursiveChild(node, (node as BinaryExpression).right);
- break;
+ return;
case SpecialPropertyAssignmentKind.ThisProperty:
case SpecialPropertyAssignmentKind.Property:
case SpecialPropertyAssignmentKind.None:
diff --git a/tests/cases/fourslash/navbarNestedCommonJsExports.ts b/tests/cases/fourslash/navbarNestedCommonJsExports.ts
new file mode 100644
index 00000000000..3c2d4499172
--- /dev/null
+++ b/tests/cases/fourslash/navbarNestedCommonJsExports.ts
@@ -0,0 +1,35 @@
+///
+
+// @allowJs: true
+
+// @Filename: /a.js
+////exports.a = exports.b = exports.c = 0;
+
+verify.navigationTree({
+ text: "",
+ kind: "script",
+ childItems: [
+ {
+ text: "a",
+ kind: "const",
+ childItems: [
+ {
+ text: "b",
+ kind: "const",
+ childItems: [{ text: "c", kind: "const" }],
+ },
+ ],
+ },
+ ],
+});
+
+verify.navigationBar([
+ {
+ text: "",
+ kind: "script",
+ childItems: [
+ { text: "a", kind: "const" },
+ ],
+ },
+]);
+