Replace widget word by dataview

This commit is contained in:
Daniel García Aubert 2017-09-15 10:37:51 +02:00
parent 9c64d674b3
commit 2437288d9d

View File

@ -51,15 +51,15 @@ var TYPE = 'formula';
*/ */
function Formula(query, options = {}, queries = {}) { function Formula(query, options = {}, queries = {}) {
if (typeof options.operation !== 'string') { if (typeof options.operation !== 'string') {
throw new Error('Formula expects `operation` in widget options'); throw new Error(`Formula expects 'operation' in dataview options`);
} }
if (!VALID_OPERATIONS[options.operation]) { if (!VALID_OPERATIONS[options.operation]) {
throw new Error("Formula does not support '" + options.operation + "' operation"); throw new Error(`Formula does not support '${options.operation}' operation`)
} }
if (options.operation !== 'count' && typeof options.column !== 'string') { if (options.operation !== 'count' && typeof options.column !== 'string') {
throw new Error('Formula expects `column` in widget options'); throw new Error(`Formula expects 'column' in dataview options`);
} }
BaseDataview.apply(this); BaseDataview.apply(this);