From 2033aa00abb74ec4c950f6288303ac0c09b0ac7f Mon Sep 17 00:00:00 2001 From: martinRenou Date: Fri, 25 Nov 2022 15:39:58 +0100 Subject: [PATCH] Fix vega expressions Signed-off-by: martinRenou --- js/vegaexpr.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/vegaexpr.ts b/js/vegaexpr.ts index 45273394..5420c423 100644 --- a/js/vegaexpr.ts +++ b/js/vegaexpr.ts @@ -15,8 +15,10 @@ import { MODULE_NAME, MODULE_VERSION } from './version'; // manually create and bind that locale context to the format function. const locale = vegaFormat.defaultLocale(); const dataflow = { context: { dataflow: { locale: () => locale } } }; -vegaFunctions.functionContext.format = - vegaFunctions.functionContext.format.bind(dataflow); +for (const name in vegaFunctions.functionContext) { + vegaFunctions.functionContext[name] = + vegaFunctions.functionContext[name].bind(dataflow); +} export class VegaExprModel extends WidgetModel { defaults() {