diff --git a/src/datasource.ts b/src/datasource.ts index 2072fc4..ff5e112 100644 --- a/src/datasource.ts +++ b/src/datasource.ts @@ -91,8 +91,10 @@ export class DataSource extends DataSourceApi { } private formatter(value: string | string[], options: any): string { - if (options.multi) { + if (options.multi && Array.isArray(value)) { return (value as string[]).map(v => `'${v}'`).join(','); + } else if (options.multi) { + return `'${value}'`; } return value as string; }