File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -289,7 +289,9 @@ export const getLayer: GetLayerType<GeoJsonLayer> = function ({
289289 if ( fd . enable_labels ) {
290290 if ( fd . enable_label_javascript_mode ) {
291291 const generator = sandboxedEval ( fd . label_javascript_config_generator ) ;
292- labelOpts = computeGeoJsonTextOptionsFromJsOutput ( generator ( ) ) ;
292+ if ( typeof generator === 'function' ) {
293+ labelOpts = computeGeoJsonTextOptionsFromJsOutput ( generator ( ) ) ;
294+ }
293295 } else {
294296 labelOpts = computeGeoJsonTextOptionsFromFormData ( fd ) ;
295297 }
@@ -299,7 +301,9 @@ export const getLayer: GetLayerType<GeoJsonLayer> = function ({
299301 if ( fd . enable_icons ) {
300302 if ( fd . enable_icon_javascript_mode ) {
301303 const generator = sandboxedEval ( fd . icon_javascript_config_generator ) ;
302- iconOpts = computeGeoJsonIconOptionsFromJsOutput ( generator ( ) ) ;
304+ if ( typeof generator === 'function' ) {
305+ iconOpts = computeGeoJsonIconOptionsFromJsOutput ( generator ( ) ) ;
306+ }
303307 } else {
304308 iconOpts = computeGeoJsonIconOptionsFromFormData ( fd ) ;
305309 }
You can’t perform that action at this time.
0 commit comments