This is an automated email from the ASF dual-hosted git repository. rusackas pushed a commit to branch handlebars-helpers-rebased in repository https://gitbox.apache.org/repos/asf/superset.git
commit cccaa0a4be1fe2538413164ef7f20abe7337a6e5 Author: Ville Brofeldt <[email protected]> AuthorDate: Wed May 18 07:15:26 2022 +0300 add import --- .../src/components/Handlebars/HandlebarsViewer.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/components/Handlebars/HandlebarsViewer.tsx b/superset-frontend/plugins/plugin-chart-handlebars/src/components/Handlebars/HandlebarsViewer.tsx index 67ddb83439..77ebe65a80 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/src/components/Handlebars/HandlebarsViewer.tsx +++ b/superset-frontend/plugins/plugin-chart-handlebars/src/components/Handlebars/HandlebarsViewer.tsx @@ -21,6 +21,7 @@ import Handlebars from 'handlebars'; import moment from 'moment'; import React, { useMemo, useState } from 'react'; import { isPlainObject } from 'lodash'; +import Helpers from 'just-handlebars-helpers'; export interface HandlebarsViewerProps { templateSource: string; @@ -73,3 +74,5 @@ Handlebars.registerHelper('stringify', (obj: any, obj2: any) => { throw Error('Please call with an object. Example: `stringify myObj`'); return isPlainObject(obj) ? JSON.stringify(obj) : String(obj); }); + +Helpers.registerHelpers(Handlebars);
