Skip to content

Commit

Permalink
better handle displayable types
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-marechal committed Jul 11, 2022
1 parent 1006f2e commit 75e82fe
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,15 @@ export namespace VariableResolverService {
this.options.commandIdVariables,
this.options.configuration
);
if (typeof resolved !== 'object') {
this.resolved.set(name, resolved?.toString?.());
if (
typeof resolved === 'bigint' ||
typeof resolved === 'boolean' ||
typeof resolved === 'number' ||
typeof resolved === 'string'
) {
this.resolved.set(name, `${resolved}`);
} else {
this.resolved.set(name, undefined);
}
} catch (e) {
if (isCancelled(e)) {
Expand Down

0 comments on commit 75e82fe

Please sign in to comment.