fix check in parseMessageArguments

This commit is contained in:
Joao Moreno
2017-02-02 17:33:05 +01:00
parent ee7de5d404
commit c2ad779c60

View File

@@ -260,7 +260,7 @@ export function createApiFactory(initData: IInitData, threadService: IThreadServ
function parseMessageArguments(args: any[]): { options: vscode.MessageOptions; items: any[]; } {
const [first, ...rest] = args;
if (first && (typeof first === 'string' || first.title)) {
if (typeof first === 'string' || (first && first.title)) {
return { options: emptyMessageOptions, items: args };
} else {
return { options: first || emptyMessageOptions, items: rest };