Skip to content

Commit e5f451a

Browse files
committed
Add note about falsy viewerId
1 parent 0293759 commit e5f451a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/vs/workbench/contrib/positronVariables/browser/components/variableItem.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,11 @@ export const VariableItem = (props: VariableItemProps) => {
137137
));
138138
}
139139

140-
// If a binding was returned, save the binding between the viewer and the variable item.
140+
// If a binding was returned, save the binding between the viewer and the
141+
// variable item. Note that we intentionally treat `""` as falsy here so
142+
// that backends can return an empty ID if no comm was open. This happens
143+
// with Ark when the user views a function object: a virtual document is
144+
// opened in an editor but is not managed by a comm.
141145
if (viewerId) {
142146
explorerService.setInstanceForVar(viewerId, item.id);
143147
}

0 commit comments

Comments
 (0)